glsl: (colclip) HDR doesn't need wrapping neither clamping

Might save a couple of instruction in the PS
This commit is contained in:
Gregory Hainaut 2015-08-07 09:48:35 +02:00
parent 8a4c0e9782
commit bd0de8fbaf
2 changed files with 4 additions and 4 deletions

View File

@ -442,7 +442,7 @@ void ps_blend(inout vec4 Color, float As)
// FIXME dithering
// Correct the Color value based on the output format
#if PS_COLCLIP == 0
#if PS_COLCLIP == 0 && PS_HDR == 0
// Standard Clamp
Color.rgb = clamp(Color.rgb, vec3(0.0f), vec3(255.0f));
#endif
@ -457,7 +457,7 @@ void ps_blend(inout vec4 Color, float As)
// In 16 bits format, only 5 bits of colors are used. It impacts shadows computation of Castlevania
Color.rgb = vec3(ivec3(Color.rgb) & ivec3(0xF8));
#elif PS_COLCLIP == 1
#elif PS_COLCLIP == 1 && PS_HDR == 0
Color.rgb = vec3(ivec3(Color.rgb) & ivec3(0xFF));
#endif

View File

@ -1301,7 +1301,7 @@ static const char* tfx_fs_all_glsl =
" // FIXME dithering\n"
"\n"
" // Correct the Color value based on the output format\n"
"#if PS_COLCLIP == 0\n"
"#if PS_COLCLIP == 0 && PS_HDR == 0\n"
" // Standard Clamp\n"
" Color.rgb = clamp(Color.rgb, vec3(0.0f), vec3(255.0f));\n"
"#endif\n"
@ -1316,7 +1316,7 @@ static const char* tfx_fs_all_glsl =
" // In 16 bits format, only 5 bits of colors are used. It impacts shadows computation of Castlevania\n"
"\n"
" Color.rgb = vec3(ivec3(Color.rgb) & ivec3(0xF8));\n"
"#elif PS_COLCLIP == 1\n"
"#elif PS_COLCLIP == 1 && PS_HDR == 0\n"
" Color.rgb = vec3(ivec3(Color.rgb) & ivec3(0xFF));\n"
"#endif\n"
"\n"