]> 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)
committerRudolf Polzer <divverent@alientrap.org>
Tue, 3 Aug 2010 19:56:11 +0000 (21:56 +0200)
(unusual being anything other than add or alpha)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10369 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=e0410fecc50dfcc3c1a51c9d433067ee5b52b815

gl_rmain.c

index 637e5be5f1196435f74a22030bbc859907e0a28f..136495027cfe0af194fe02315bdcdd1332877b28 100644 (file)
@@ -9502,6 +9502,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)
@@ -9520,8 +9523,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];
                }