mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-16 09:31:14 +00:00
Implement additive colours on HUD sprites
Also, make sure the alpha for the additive colour is 255. # Conflicts: # src/hwrenderer/scene/hw_sprites.cpp # src/hwrenderer/scene/hw_walls.cpp # src/hwrenderer/scene/hw_weapon.cpp # Conflicts: # src/gl/scene/gl_weapon.cpp
This commit is contained in:
parent
16a52cd8c8
commit
866c6e13a6
3 changed files with 10 additions and 3 deletions
|
@ -363,7 +363,7 @@ void GLSprite::Draw(int pass)
|
|||
: ThingColor.Modulate(cursec->SpecialColors[sector_t::sprites]);
|
||||
|
||||
gl_RenderState.SetObjectColor(finalcol);
|
||||
gl_RenderState.SetAddColor(cursec->SpecialColors[sector_t::add]);
|
||||
gl_RenderState.SetAddColor(cursec->SpecialColors[sector_t::add] | 0xff000000);
|
||||
}
|
||||
mDrawer->SetColor(lightlevel, rel, Colormap, trans);
|
||||
}
|
||||
|
|
|
@ -368,7 +368,7 @@ void GLWall::RenderTextured(int rflags)
|
|||
PalEntry color2 = side->GetSpecialColor(tierndx, side_t::wallbottom, frontsector);
|
||||
gl_RenderState.SetObjectColor(color1);
|
||||
gl_RenderState.SetObjectColor2(color2);
|
||||
gl_RenderState.SetAddColor(seg->frontsector->SpecialColors[sector_t::add]);
|
||||
gl_RenderState.SetAddColor(seg->frontsector->SpecialColors[sector_t::add] | 0xff000000);
|
||||
if (color1 != color2)
|
||||
{
|
||||
// Do gradient setup only if there actually is a gradient.
|
||||
|
|
|
@ -447,7 +447,14 @@ void GLSceneDrawer::DrawPlayerSprites(sector_t * viewsector, bool hudModelStep)
|
|||
}
|
||||
SetColor(ll, 0, cmc, trans, true);
|
||||
}
|
||||
// gl_RenderState.SetAddColor(0);
|
||||
if (owner->Sector)
|
||||
{
|
||||
gl_RenderState.SetAddColor(owner->Sector->SpecialColors[sector_t::add] | 0xff000000);
|
||||
}
|
||||
else
|
||||
{
|
||||
gl_RenderState.SetAddColor(0);
|
||||
}
|
||||
|
||||
if (psp->firstTic)
|
||||
{ // Can't interpolate the first tic.
|
||||
|
|
Loading…
Reference in a new issue