]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix two mistakes in glsl/default.glsl deluxemapping paths which broke on
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 6 Dec 2007 15:55:58 +0000 (15:55 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 6 Dec 2007 15:55:58 +0000 (15:55 +0000)
ATI

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7770 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

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