From: divverent Date: Sat, 6 Jun 2009 13:02:26 +0000 (+0000) Subject: simplify glsl code (we can do vec3(y)) X-Git-Tag: xonotic-v0.1.0preview~1613 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e3b159c024e00ffe2d710034329e7469ac7bc4ef;p=xonotic%2Fdarkplaces.git simplify glsl code (we can do vec3(y)) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9008 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_rmain.c b/gl_rmain.c index 625b5b13..72bfa4bb 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -518,8 +518,8 @@ static const char *builtinshaderstring = "#ifdef USESATURATION\n" " //apply saturation BEFORE gamma ramps, so v_glslgamma value does not matter\n" " myhalf y = dot(gl_FragColor.rgb, vec3(0.299, 0.587, 0.114));\n" -" //gl_FragColor = vec3(y, y, y) + (gl_FragColor.rgb - vec3(y, y, y)) * Saturation;\n" -" gl_FragColor.rgb = mix(vec3(y, y, y), gl_FragColor.rgb, Saturation);\n" // TODO: test this on ATI +" //gl_FragColor = vec3(y) + (gl_FragColor.rgb - vec3(y)) * Saturation;\n" +" gl_FragColor.rgb = mix(vec3(y), gl_FragColor.rgb, Saturation);\n" // TODO: test this on ATI "#endif\n" "\n" "#ifdef USEGAMMARAMPS\n"