From: havoc Date: Wed, 9 Feb 2011 09:13:34 +0000 (+0000) Subject: fix an error in the HLSL shader (unintentional use of mix rather than lerp function) X-Git-Tag: xonotic-v0.5.0~438^2~5 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=714d028ac87a3f68c65eaa0a658988f08a42e975;p=xonotic%2Fdarkplaces.git fix an error in the HLSL shader (unintentional use of mix rather than lerp function) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10836 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_rmain.c b/gl_rmain.c index 5b6f2cc4..0e456505 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -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"