]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix mistakes in the fix for the previous mistakes in default.glsl
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 6 Dec 2007 16:32:41 +0000 (16:32 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 6 Dec 2007 16:32:41 +0000 (16:32 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7771 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index fa7f2acd204ddb4522a5115705a25bac61b467fa..55484014d05da3e5c22f155e076c5b095b15e0c8 100644 (file)
@@ -793,7 +793,7 @@ static const char *builtinshaderstring =
 "# endif\n"
 "\n"
 "      // apply lightmap color\n"
-"      color.rgb = tempcolor * myhvec3(texture2D(Texture_Lightmap, TexCoordLightmap)) * myhvec3(gl_Color) + color * AmbientScale;\n"
+"      color.rgb = color.rgb * AmbientScale + tempcolor * myhvec3(texture2D(Texture_Lightmap, TexCoordLightmap)) * myhvec3(gl_Color);\n"
 "      color.a *= myhalf(gl_Color.a);\n"
 "#endif // MODE_LIGHTDIRECTIONMAP_MODELSPACE\n"
 "\n"
@@ -815,7 +815,7 @@ static const char *builtinshaderstring =
 "# endif\n"
 "\n"
 "      // apply lightmap color\n"
-"      color.rgb = tempcolor * myhvec3(texture2D(Texture_Lightmap, TexCoordLightmap)) * myhvec3(gl_Color) + color * AmbientScale;\n"
+"      color.rgb = color.rgb * AmbientScale + tempcolor * myhvec3(texture2D(Texture_Lightmap, TexCoordLightmap)) * myhvec3(gl_Color);\n"
 "      color.a *= myhalf(gl_Color.a);\n"
 "#endif // MODE_LIGHTDIRECTIONMAP_TANGENTSPACE\n"
 "\n"