From 9d36e61d3fe100bd9ca50f707d2491c3cbd2c421 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 9 Jun 2021 00:47:13 +0200 Subject: [PATCH] - depth bias fixes. --- source/core/rendering/scene/hw_drawinfo.cpp | 2 +- source/core/rendering/scene/hw_walls.cpp | 2 +- source/core/version.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/core/rendering/scene/hw_drawinfo.cpp b/source/core/rendering/scene/hw_drawinfo.cpp index 53bb84708..8edcf1ffc 100644 --- a/source/core/rendering/scene/hw_drawinfo.cpp +++ b/source/core/rendering/scene/hw_drawinfo.cpp @@ -538,7 +538,7 @@ void HWDrawInfo::RenderScene(FRenderState &state) drawlists[GLDL_MASKEDWALLSH].DrawWalls(this, state, false); state.SetColorMask(true); - state.SetDepthBias(-1, 128); + state.SetDepthBias(-1, -128); state.SetDepthMask(false); drawlists[GLDL_MASKEDFLATS].DrawFlats(this, state, false); state.SetDepthMask(true); diff --git a/source/core/rendering/scene/hw_walls.cpp b/source/core/rendering/scene/hw_walls.cpp index 30dfda141..24d54c23b 100644 --- a/source/core/rendering/scene/hw_walls.cpp +++ b/source/core/rendering/scene/hw_walls.cpp @@ -272,7 +272,7 @@ void HWWall::RenderTexturedWall(HWDrawInfo *di, FRenderState &state, int rflags) else if (!(rflags & RWF_TRANS)) { auto oldbias = state.GetDepthBias(); - if (walldist >= 0) state.SetDepthBias(-1, glseg.x1 == glseg.x2 || glseg.y1 == glseg.y2? -128 : -192); + if (walldist >= 0) state.SetDepthBias(-1, glseg.x1 == glseg.x2 || glseg.y1 == glseg.y2? -129 : -192); else state.ClearDepthBias(); RenderWall(di, state, rflags); state.SetDepthBias(oldbias); diff --git a/source/core/version.h b/source/core/version.h index e96877c87..be58e56e4 100644 --- a/source/core/version.h +++ b/source/core/version.h @@ -74,7 +74,7 @@ const char *GetVersionString(); #define MINSAVEVER_SW 12 #define MINSAVEVER_PS 12 -#define SAVEVER_DN3D 10 +#define SAVEVER_DN3D 11 #define SAVEVER_BLD 11 #define SAVEVER_SW 12 #define SAVEVER_PS 13