- apply depth bias to translucent geometry.

This is necessary to handle wall and floor sprites placed on actual walls and floors work as intended.
This commit is contained in:
Christoph Oelckers 2021-03-29 19:45:04 +02:00
parent b93502f0d0
commit 2d0360fa55

View file

@ -486,6 +486,8 @@ void HWDrawInfo::RenderTranslucent(FRenderState &state)
{
RenderAll.Clock();
state.SetDepthBias(-1, -128);
// final pass: translucent stuff
state.AlphaFunc(Alpha_GEqual, gl_mask_sprite_threshold);
state.SetRenderStyle(STYLE_Translucent);
@ -497,7 +499,7 @@ void HWDrawInfo::RenderTranslucent(FRenderState &state)
drawlists[GLDL_TRANSLUCENT].DrawSorted(this, state);
state.EnableBrightmap(false);
state.ClearDepthBias();
state.AlphaFunc(Alpha_GEqual, 0.5f);
state.SetDepthMask(true);