Skip to content

Commit

Permalink
- depth bias fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Jun 8, 2021
1 parent 5b38343 commit 9d36e61
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion source/core/rendering/scene/hw_drawinfo.cpp
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion source/core/rendering/scene/hw_walls.cpp
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion source/core/version.h
Expand Up @@ -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
Expand Down

0 comments on commit 9d36e61

Please sign in to comment.