From: havoc Date: Wed, 9 May 2007 00:17:21 +0000 (+0000) Subject: removed a wasted normalize in fragment shader for model lighting X-Git-Tag: xonotic-v0.1.0preview~3194 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0b22f928d2229a7f617693d249b414f07e33baf3;p=xonotic%2Fdarkplaces.git removed a wasted normalize in fragment shader for model lighting git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7253 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_rmain.c b/gl_rmain.c index 6d010a61..41315e4d 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -596,7 +596,7 @@ static const char *builtinshaderstring = "\n" " // get the surface normal and light normal\n" " myhvec3 surfacenormal = normalize(myhvec3(texture2D(Texture_Normal, TexCoord)) - myhvec3(0.5));\n" -" myhvec3 diffusenormal = myhvec3(normalize(LightVector));\n" +" myhvec3 diffusenormal = myhvec3(LightVector);\n" "\n" " // calculate directional shading\n" " color.rgb *= AmbientColor + DiffuseColor * myhalf(max(float(dot(surfacenormal, diffusenormal)), 0.0));\n"