mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-31 09:20:59 +00:00
- use a non-0 depth bias for sprites.
Hopefully this helps fixing the z-fighting issue with wall sprites in some Blood maps.
This commit is contained in:
parent
1479e1feae
commit
215cb14401
4 changed files with 46 additions and 1 deletions
|
@ -428,6 +428,19 @@ void PolymostRenderState::Apply(PolymostShader* shader, GLState &oldState)
|
|||
else
|
||||
glDisable(GL_SCISSOR_TEST);
|
||||
}
|
||||
if (mBias.mChanged)
|
||||
{
|
||||
if (mBias.mFactor == 0 && mBias.mUnits == 0)
|
||||
{
|
||||
glDisable(GL_POLYGON_OFFSET_FILL);
|
||||
}
|
||||
else
|
||||
{
|
||||
glEnable(GL_POLYGON_OFFSET_FILL);
|
||||
}
|
||||
glPolygonOffset(mBias.mFactor, mBias.mUnits);
|
||||
mBias.mChanged = false;
|
||||
}
|
||||
|
||||
StateFlags &= ~(STF_CLEARCOLOR | STF_CLEARDEPTH | STF_VIEWPORTSET | STF_SCISSORSET);
|
||||
oldState.Flags = StateFlags;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue