mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 17:01:28 +00:00
- fixed depth buffer use of slope sprites.
They cannot be treated like perfectly horizontal floor sprites and need to write to the depth buffer in the same pass as the regular pixels.
This commit is contained in:
parent
8267f327e3
commit
ac3546bdaa
3 changed files with 3 additions and 1 deletions
|
@ -540,6 +540,7 @@ void HWDrawInfo::RenderScene(FRenderState &state)
|
|||
state.SetColorMask(true);
|
||||
|
||||
state.SetDepthBias(-1, -128);
|
||||
drawlists[GLDL_MASKEDSLOPEFLATS].DrawFlats(this, state, false);
|
||||
state.SetDepthMask(false);
|
||||
drawlists[GLDL_MASKEDFLATS].DrawFlats(this, state, false);
|
||||
state.SetDepthMask(true);
|
||||
|
|
|
@ -77,6 +77,7 @@ enum DrawListType
|
|||
GLDL_MASKEDWALLSV, // vertical wall sprites
|
||||
GLDL_MASKEDWALLSH, // horizontal wall sprites. These two lists merely exist for easier sorting.
|
||||
GLDL_MASKEDFLATS,
|
||||
GLDL_MASKEDSLOPEFLATS,
|
||||
GLDL_MODELS,
|
||||
|
||||
GLDL_TRANSLUCENT,
|
||||
|
|
|
@ -104,7 +104,7 @@ void HWDrawInfo::AddFlat(HWFlat *flat)
|
|||
}
|
||||
else
|
||||
{
|
||||
list = flat->Sprite ? GLDL_MASKEDFLATS : GLDL_PLAINFLATS;
|
||||
list = flat->Sprite ? ((flat->Sprite->clipdist & TSPR_SLOPESPRITE)? GLDL_MASKEDSLOPEFLATS : GLDL_MASKEDFLATS) : GLDL_PLAINFLATS;
|
||||
}
|
||||
auto newflat = drawlists[list].NewFlat(slopespr);
|
||||
*newflat = *flat;
|
||||
|
|
Loading…
Reference in a new issue