t->specularscale = r_shadow_gloss2intensity.value;
}
+ VectorClear(t->dlightcolor);
t->currentnumlayers = 0;
if (!(t->currentmaterialflags & MATERIALFLAG_NODRAW))
{
else
{
float colorscale;
+ // set the color tint used for lights affecting this surface
+ VectorSet(t->dlightcolor, ent->colormod[0] * t->currentalpha, ent->colormod[1] * t->currentalpha, ent->colormod[2] * t->currentalpha);
colorscale = 2;
// q3bsp has no lightmap updates, so the lightstylevalue that
// would normally be baked into the lightmap must be
float ambientscale, diffusescale, specularscale;
vec3_t lightcolorbase, lightcolorpants, lightcolorshirt;
// calculate colors to render this texture with
- lightcolorbase[0] = rsurface.rtlight->currentcolor[0] * rsurface.texture->currentlayers[0].color[0] * rsurface.texture->currentlayers[0].color[3];
- lightcolorbase[1] = rsurface.rtlight->currentcolor[1] * rsurface.texture->currentlayers[0].color[1] * rsurface.texture->currentlayers[0].color[3];
- lightcolorbase[2] = rsurface.rtlight->currentcolor[2] * rsurface.texture->currentlayers[0].color[2] * rsurface.texture->currentlayers[0].color[3];
+ lightcolorbase[0] = rsurface.rtlight->currentcolor[0] * rsurface.texture->dlightcolor[0];
+ lightcolorbase[1] = rsurface.rtlight->currentcolor[1] * rsurface.texture->dlightcolor[1];
+ lightcolorbase[2] = rsurface.rtlight->currentcolor[2] * rsurface.texture->dlightcolor[2];
ambientscale = rsurface.rtlight->ambientscale;
diffusescale = rsurface.rtlight->diffusescale;
specularscale = rsurface.rtlight->specularscale * rsurface.texture->specularscale;