gsdx-ogl: fix colclip

Sotc shadow and likely various games :)

Thanks to pseudo
This commit is contained in:
Gregory Hainaut 2015-04-30 23:08:05 +02:00
parent 25997647f2
commit 71e517108d
2 changed files with 6 additions and 4 deletions

View File

@ -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
}

View File

@ -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"