Skip to content

Commit

Permalink
Merge pull request #87 from microsoft/user/tvandewalle/alphaTestFix
Browse files Browse the repository at this point in the history
Allow passing any non-zero value to enable alpha test or fog
  • Loading branch information
vdwtanner authored Apr 3, 2024
2 parents 64e80b0 + 2f7bbaa commit ba766bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/9on12PixelStage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ namespace D3D9on12
switch (dwState)
{
case D3DRS_ALPHATESTENABLE:
m_rasterStates.SetAlphaTestEnable(dwValue == TRUE);
m_rasterStates.SetAlphaTestEnable(dwValue != FALSE);
break;
case D3DRS_ALPHAFUNC:
m_rasterStates.SetAlphaFunc(static_cast<D3DCMPFUNC>(dwValue));
Expand All @@ -587,7 +587,7 @@ namespace D3D9on12
m_dirtyFlags.PSExtension = true;
break;
case D3DRS_FOGENABLE:
m_rasterStates.SetFogEnable(dwValue == TRUE);
m_rasterStates.SetFogEnable(dwValue != FALSE);
break;
case D3DRS_FOGCOLOR:
ConvertToRGB(dwValue, m_PSExtension.vFogColor);
Expand Down

0 comments on commit ba766bc

Please sign in to comment.