]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix an error in the HLSL shader (unintentional use of mix rather than lerp function)
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 9 Feb 2011 09:13:34 +0000 (09:13 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 9 Feb 2011 09:13:34 +0000 (09:13 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10836 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index 5b6f2cc4af380593927537636c26112343a46555..0e45650509f688741e5ba1441edc6fd61c882f74 100644 (file)
@@ -2043,7 +2043,7 @@ const char *builtincgshaderstring =
 "      // 'vampire sight' effect, wheres red is compensated\n"
 "      #ifdef SATURATION_REDCOMPENSATE\n"
 "              float rboost = max(0.0, (gl_FragColor.r - max(gl_FragColor.g, gl_FragColor.b))*(1.0 - Saturation));\n"
-"              gl_FragColor.rgb = mix(float3(y,y,y), gl_FragColor.rgb, Saturation);\n"
+"              gl_FragColor.rgb = lerp(float3(y,y,y), gl_FragColor.rgb, Saturation);\n"
 "              gl_FragColor.r += r;\n"
 "      #else\n"
 "              // normal desaturation\n"