From 8ecb1551665c233ba559a72de2bac0f479fcfecd Mon Sep 17 00:00:00 2001 From: havoc Date: Tue, 25 Dec 2007 08:41:18 +0000 Subject: [PATCH] fix t->lightmapcolor on fullbright surfaces git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7861 d7cf8633-e32d-0410-b094-e92efae38249 --- gl_rmain.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gl_rmain.c b/gl_rmain.c index 88ea234e..aaa63242 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -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); -- 2.39.2