Skip to content

Commit

Permalink
Fixed BUG #1582440: Glowing textures don't work on mid textures.
Browse files Browse the repository at this point in the history
  • Loading branch information
danij committed Oct 23, 2006
1 parent 263248d commit 169a9bf
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions doomsday/engine/portable/src/rend_list.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,12 +282,17 @@ void RL_AddMaskedPoly(rendpoly_t *poly)
vis->data.wall.vertices[i].pos[VX] = poly->vertices[i].pos[VX];
vis->data.wall.vertices[i].pos[VY] = poly->vertices[i].pos[VY];
vis->data.wall.vertices[i].pos[VZ] = poly->vertices[i].pos[VZ];
for(c = 0; c < 4; ++c)

if(poly->flags & RPF_GLOW)
memset(&vis->data.wall.vertices[i].color, 255, 4 * 4);
else
{
vis->data.wall.vertices[i].color[c] =
poly->vertices[i].color.rgba[c];
for(c = 0; c < 4; ++c)
{
vis->data.wall.vertices[i].color[c] =
poly->vertices[i].color.rgba[c];
}
}
//vis->data.wall.vertices[i].color[3] = 255; // Alpha.
}
vis->data.wall.texc[0][VX] = poly->texoffx / (float) poly->tex.width;
vis->data.wall.texc[1][VX] =
Expand All @@ -299,8 +304,8 @@ void RL_AddMaskedPoly(rendpoly_t *poly)
vis->data.wall.blendmode = poly->blendmode;

// FIXME: Semitransparent masked polys arn't lit atm
if(poly->lights && numTexUnits > 1 && envModAdd &&
poly->vertices[0].color.rgba[3] == 255)
if(!(poly->flags & RPF_GLOW) && poly->lights && numTexUnits > 1 &&
envModAdd && poly->vertices[0].color.rgba[3] == 255)
{
// Choose the brightest light.
memcpy(brightest, poly->lights->color, 3);
Expand Down

0 comments on commit 169a9bf

Please sign in to comment.