- 2D drawer implementation complete for hardware renderer.
This also replaces DTA_ColormapStyle with proper implementations of its components. As implemented it was a very awkward mixture of various effects that already existed in a separate form. As a result of its implementation it required additional but completely redundant shader support which could be removed now. As a side effect of this change a new DTA_Desaturate option was added.
This commit is contained in:
parent
077df87704
commit
a40e085a46
16 changed files with 79 additions and 97 deletions
|
|
@ -179,7 +179,8 @@ void RenderPolyPlayerSprites::RenderRemainingSprites()
|
|||
DTA_FillColor, sprite.FillColor,
|
||||
DTA_SpecialColormap, sprite.special,
|
||||
DTA_ColorOverlay, sprite.overlay.d,
|
||||
DTA_ColormapStyle, sprite.usecolormapstyle ? &sprite.colormapstyle : nullptr,
|
||||
DTA_Color, sprite.LightColor,
|
||||
DTA_Desaturate, sprite.Desaturate,
|
||||
TAG_DONE);
|
||||
}
|
||||
|
||||
|
|
@ -441,19 +442,12 @@ void RenderPolyPlayerSprites::RenderSprite(PolyRenderThread *thread, DPSprite *p
|
|||
{
|
||||
accelSprite.special = PolyCameraLight::Instance()->ShaderColormap();
|
||||
}
|
||||
else if (colormap_to_use->Color == PalEntry(255, 255, 255) &&
|
||||
colormap_to_use->Desaturate == 0)
|
||||
else
|
||||
{
|
||||
accelSprite.overlay = colormap_to_use->Fade;
|
||||
accelSprite.overlay.a = uint8_t(vis.Light.ColormapNum * 255 / NUMCOLORMAPS);
|
||||
}
|
||||
else
|
||||
{
|
||||
accelSprite.usecolormapstyle = true;
|
||||
accelSprite.colormapstyle.Color = colormap_to_use->Color;
|
||||
accelSprite.colormapstyle.Fade = colormap_to_use->Fade;
|
||||
accelSprite.colormapstyle.Desaturate = colormap_to_use->Desaturate;
|
||||
accelSprite.colormapstyle.FadeLevel = vis.Light.ColormapNum / float(NUMCOLORMAPS);
|
||||
accelSprite.LightColor = colormap_to_use->Color;
|
||||
accelSprite.Desaturate = (uint8_t)clamp(colormap_to_use->Desaturate, 0, 255);
|
||||
}
|
||||
|
||||
AcceleratedSprites.Push(accelSprite);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue