- use a sector's special sprite color to colorize decals.

This commit is contained in:
Christoph Oelckers 2020-09-26 23:39:42 +02:00
parent 9a166d894b
commit d1e613e514
1 changed files with 8 additions and 1 deletions

View File

@ -47,11 +47,18 @@
void HWDecal::DrawDecal(HWDrawInfo *di, FRenderState &state)
{
PalEntry DecalColor;
// alpha color only has an effect when using an alpha texture.
if (decal->RenderStyle.Flags & (STYLEF_RedIsAlpha | STYLEF_ColorIsFixed))
{
state.SetObjectColor(decal->AlphaColor | 0xff000000);
DecalColor = decal->AlphaColor | 0xff000000;
}
else
DecalColor = 0xffffffff;
if (!di->isFullbrightScene()) DecalColor = DecalColor.Modulate(frontsector->SpecialColors[sector_t::sprites]);
state.SetObjectColor(DecalColor);
state.SetLightIndex(dynlightindex);
state.SetTextureMode(decal->RenderStyle);