]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
a different fix for colormod on unusual blendfuncs than the last one
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 30 Jul 2010 06:22:01 +0000 (06:22 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 30 Jul 2010 06:22:01 +0000 (06:22 +0000)
(unusual being anything other than add or alpha)

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

gl_rmain.c

index 6ea51c2853997970a8117f2eae8183e642d71789..842159fe0cbf5a9e117a44acd0ddad006965d586 100644 (file)
@@ -10442,6 +10442,9 @@ texture_t *R_GetCurrentTexture(texture_t *t)
        }
 
        Vector4Set(t->lightmapcolor, rsurface.colormod[0], rsurface.colormod[1], rsurface.colormod[2], t->currentalpha);
+       // don't colormod customblend textures
+       if (t->currentmaterialflags & MATERIALFLAG_CUSTOMBLEND)
+               VectorSet(t->lightmapcolor, 1, 1, 1);
        VectorClear(t->dlightcolor);
        t->currentnumlayers = 0;
        if (t->currentmaterialflags & MATERIALFLAG_WALL)
@@ -10460,8 +10463,6 @@ texture_t *R_GetCurrentTexture(texture_t *t)
                }
                else if (t->currentmaterialflags & MATERIALFLAG_CUSTOMBLEND)
                {
-                       // don't colormod customblend textures
-                       VectorSet(t->lightmapcolor, 1, 1, 1);
                        blendfunc1 = t->customblendfunc[0];
                        blendfunc2 = t->customblendfunc[1];
                }