From 714d028ac87a3f68c65eaa0a658988f08a42e975 Mon Sep 17 00:00:00 2001 From: havoc Date: Wed, 9 Feb 2011 09:13:34 +0000 Subject: [PATCH] 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 --- gl_rmain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" -- 2.39.2