From: havoc Date: Tue, 25 Dec 2007 08:41:18 +0000 (+0000) Subject: fix t->lightmapcolor on fullbright surfaces X-Git-Tag: xonotic-v0.1.0preview~2630 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8ecb1551665c233ba559a72de2bac0f479fcfecd;p=xonotic%2Fdarkplaces.git fix t->lightmapcolor on fullbright surfaces git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7861 d7cf8633-e32d-0410-b094-e92efae38249 --- 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);