]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
removed a wasted normalize in fragment shader for model lighting
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 9 May 2007 00:17:21 +0000 (00:17 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 9 May 2007 00:17:21 +0000 (00:17 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7253 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index 6d010a612ed0ff92b86e49cf2e6baa0dfdd60610..41315e4d394fe4b0f224feb1ee59855ed68fce79 100644 (file)
@@ -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"