diff --git a/plugins/GSdx/res/glsl/tfx_fs.glsl b/plugins/GSdx/res/glsl/tfx_fs.glsl index 51eb214a69..4ddaf100d3 100644 --- a/plugins/GSdx/res/glsl/tfx_fs.glsl +++ b/plugins/GSdx/res/glsl/tfx_fs.glsl @@ -363,10 +363,11 @@ void colclip(inout vec4 c) { #if (PS_COLCLIP == 2) c.rgb = 256.0f/255.0f - c.rgb; -#elif (PS_COLCLIP > 0) +#endif +#if (PS_COLCLIP > 0) // FIXME !!!! //c.rgb *= c.rgb < 128./255; - bvec3 factor = bvec3(128.0f/255.0f, 128.0f/255.0f, 128.0f/255.0f); + bvec3 factor = lessThan(c.rgb, vec3(128.0f/255.0f)); c.rgb *= vec3(factor); #endif } diff --git a/plugins/GSdx/res/glsl_source.h b/plugins/GSdx/res/glsl_source.h index c317f2385a..268d773937 100644 --- a/plugins/GSdx/res/glsl_source.h +++ b/plugins/GSdx/res/glsl_source.h @@ -1104,10 +1104,11 @@ static const char* tfx_fs_all_glsl = "{\n" "#if (PS_COLCLIP == 2)\n" " c.rgb = 256.0f/255.0f - c.rgb;\n" - "#elif (PS_COLCLIP > 0)\n" + "#endif\n" + "#if (PS_COLCLIP > 0)\n" " // FIXME !!!!\n" " //c.rgb *= c.rgb < 128./255;\n" - " bvec3 factor = bvec3(128.0f/255.0f, 128.0f/255.0f, 128.0f/255.0f);\n" + " bvec3 factor = lessThan(c.rgb, vec3(128.0f/255.0f));\n" " c.rgb *= vec3(factor);\n" "#endif\n" "}\n"