mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 03:30:46 +00:00
- use a higher depth bias for non-orthogonal wall sprites.
Due to minor angular inaccuracies they are more sensitive to z-ordering than orthogonal ones when things are closely stacked.
This commit is contained in:
parent
d572e56839
commit
079a95a0a3
1 changed files with 4 additions and 2 deletions
|
@ -235,9 +235,10 @@ void HWWall::RenderTexturedWall(HWDrawInfo *di, FRenderState &state, int rflags)
|
|||
state.SetNpotEmulation(float(h2) / h, xOffset);
|
||||
}
|
||||
}
|
||||
else if (walldist >= 0 && !(rflags & RWF_TRANS))
|
||||
else if (!(rflags & RWF_TRANS))
|
||||
{
|
||||
state.SetDepthBias(-1, -128);
|
||||
if (walldist >= 0) state.SetDepthBias(-1, glseg.x1 == glseg.x2 || glseg.y1 == glseg.y2? -128 : -192);
|
||||
else state.ClearDepthBias();
|
||||
}
|
||||
|
||||
RenderWall(di, state, rflags);
|
||||
|
@ -1138,6 +1139,7 @@ void HWWall::ProcessWallSprite(HWDrawInfo* di, spritetype* spr, sectortype* sect
|
|||
height = (int)tex->GetDisplayHeight();
|
||||
topofs = ((int)tex->GetDisplayTopOffset() + spr->yoffset);
|
||||
}
|
||||
|
||||
walldist = IsOnWall(spr, height);
|
||||
|
||||
if (spr->cstat & CSTAT_SPRITE_YFLIP)
|
||||
|
|
Loading…
Reference in a new issue