Skip to content

Commit

Permalink
- proper maintenance of the depth bias state.
Browse files Browse the repository at this point in the history
Change state must be combined, not overwritten, or it may miss some needed state changes.
  • Loading branch information
coelckers committed Jan 13, 2022
1 parent fcf04a7 commit 049fc5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/common/rendering/hwrenderer/data/hw_renderstate.h
Expand Up @@ -585,7 +585,7 @@ class FRenderState

void SetDepthBias(float a, float b)
{
mBias.mChanged = mBias.mFactor != a || mBias.mUnits != b;
mBias.mChanged |= mBias.mFactor != a || mBias.mUnits != b;
mBias.mFactor = a;
mBias.mUnits = b;
}
Expand All @@ -597,7 +597,7 @@ class FRenderState

void ClearDepthBias()
{
mBias.mChanged = mBias.mFactor != 0 || mBias.mUnits != 0;
mBias.mChanged |= mBias.mFactor != 0 || mBias.mUnits != 0;
mBias.mFactor = 0;
mBias.mUnits = 0;
}
Expand Down

0 comments on commit 049fc5f

Please sign in to comment.