mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 21:21:04 +00:00
Implement additive colours on HUD sprites
Also, make sure the alpha for the additive colour is 255.
This commit is contained in:
parent
33723e8904
commit
6485570c93
3 changed files with 7 additions and 3 deletions
|
@ -159,7 +159,7 @@ void GLSprite::DrawSprite(HWDrawInfo *di, FRenderState &state, bool translucent)
|
|||
: ThingColor.Modulate(cursec->SpecialColors[sector_t::sprites]);
|
||||
|
||||
state.SetObjectColor(finalcol);
|
||||
state.SetAddColor(cursec->SpecialColors[sector_t::add]);
|
||||
state.SetAddColor(cursec->SpecialColors[sector_t::add] | 0xff000000);
|
||||
}
|
||||
state.SetColor(lightlevel, rel, di->isFullbrightScene(), Colormap, trans);
|
||||
}
|
||||
|
|
|
@ -174,7 +174,7 @@ void GLWall::RenderTexturedWall(HWDrawInfo *di, FRenderState &state, int rflags)
|
|||
PalEntry color2 = side->GetSpecialColor(tierndx, side_t::wallbottom, frontsector);
|
||||
state.SetObjectColor(color1);
|
||||
state.SetObjectColor2(color2);
|
||||
state.SetAddColor(seg->frontsector->SpecialColors[sector_t::add]);
|
||||
state.SetAddColor(seg->frontsector->SpecialColors[sector_t::add] | 0xff000000);
|
||||
if (color1 != color2)
|
||||
{
|
||||
// Do gradient setup only if there actually is a gradient.
|
||||
|
|
|
@ -72,7 +72,11 @@ void HWDrawInfo::DrawPSprite(HUDSprite *huds, FRenderState &state)
|
|||
state.SetRenderStyle(huds->RenderStyle);
|
||||
state.SetTextureMode(huds->RenderStyle);
|
||||
state.SetObjectColor(huds->ObjectColor);
|
||||
// state.SetAddColor(0);
|
||||
if (huds->owner->Sector) {
|
||||
state.SetAddColor(huds->owner->Sector->SpecialColors[sector_t::add] | 0xff000000);
|
||||
} else {
|
||||
state.SetAddColor(0);
|
||||
}
|
||||
state.SetDynLight(huds->dynrgb[0], huds->dynrgb[1], huds->dynrgb[2]);
|
||||
state.EnableBrightmap(!(huds->RenderStyle.Flags & STYLEF_ColorIsFixed));
|
||||
|
||||
|
|
Loading…
Reference in a new issue