]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix t->lightmapcolor on fullbright surfaces
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 25 Dec 2007 08:41:18 +0000 (08:41 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 25 Dec 2007 08:41:18 +0000 (08:41 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7861 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index 88ea234e78c2e8f003ae7860e9f52bff53c8d509..aaa63242dfa860511c49776535177a83a468114a 100644 (file)
@@ -4224,6 +4224,7 @@ void R_UpdateTextureInfo(const entity_render_t *ent, texture_t *t)
                t->specularscale = 0;
        }
 
+       Vector4Set(t->lightmapcolor, ent->colormod[0], ent->colormod[1], ent->colormod[2], t->currentalpha);
        VectorClear(t->dlightcolor);
        t->currentnumlayers = 0;
        if (!(t->currentmaterialflags & MATERIALFLAG_NODRAW))
@@ -4281,7 +4282,7 @@ void R_UpdateTextureInfo(const entity_render_t *ent, texture_t *t)
                                        if (ent->model->type == mod_brushq3)
                                                colorscale *= r_refdef.rtlightstylevalue[0];
                                        colorscale *= r_refdef.lightmapintensity;
-                                       Vector4Set(t->lightmapcolor, ent->colormod[0] * colorscale, ent->colormod[1] * colorscale, ent->colormod[2] * colorscale, t->currentalpha);
+                                       VectorScale(t->lightmapcolor, colorscale, t->lightmapcolor);
                                        R_Texture_AddLayer(t, depthmask, blendfunc1, blendfunc2, TEXTURELAYERTYPE_LITTEXTURE, currentbasetexture, &t->currenttexmatrix, ent->colormod[0] * colorscale, ent->colormod[1] * colorscale, ent->colormod[2] * colorscale, t->currentalpha);
                                        if (r_ambient.value >= (1.0f/64.0f))
                                                R_Texture_AddLayer(t, false, GL_SRC_ALPHA, GL_ONE, TEXTURELAYERTYPE_TEXTURE, currentbasetexture, &t->currenttexmatrix, ent->colormod[0] * r_ambient.value * (1.0f / 64.0f), ent->colormod[1] * r_ambient.value * (1.0f / 64.0f), ent->colormod[2] * r_ambient.value * (1.0f / 64.0f), t->currentalpha);