- added a few more texture coloring options to the shader.

Aside from adding an additive component it can now also do:

- desaturation (not limited to the range of 0..1 so it can also be used for oversaturation by applying a negative number or negative saturation by going above 1.0.
- invert the texture
- apply a blend, including 3 special mode taken from EDuke32.

Currently only the implementation is done, it is not exposed to UDMF yet.
This commit is contained in:
Christoph Oelckers 2019-12-20 16:05:00 +01:00
commit 3209d4ed23
7 changed files with 142 additions and 6 deletions

View file

@ -175,6 +175,7 @@ void HWWall::RenderTexturedWall(HWDrawInfo *di, FRenderState &state, int rflags)
state.SetObjectColor(color1);
state.SetObjectColor2((color1 != color2) ? color2 : PalEntry(0));
state.SetAddColor(side->GetAdditiveColor(tierndx, frontsector));
if (color1 != color2)
{
// Do gradient setup only if there actually is a gradient.
@ -243,6 +244,9 @@ void HWWall::RenderTexturedWall(HWDrawInfo *di, FRenderState &state, int rflags)
state.SetTextureMode(tmode);
state.EnableGlow(false);
state.EnableGradient(false);
state.SetObjectDesaturateFactor(0);
state.SetObjectInvert(false);
state.SetObjectBlendMode(0);
}
//==========================================================================