floating-point zbias. For compatibility, 0 is off and 1 is the old "zbias on".

Going beyond 1 is allowed, but the usable/useful range of values is currently
undefined--try to stick to 0..1.
This commit is contained in:
Glenn Maynard
2005-05-06 04:05:02 +00:00
parent 52520f2135
commit 47db6ca9c4
8 changed files with 19 additions and 19 deletions
+5 -2
View File
@@ -76,7 +76,7 @@ void Actor::Reset()
m_bTextureWrapping = false;
m_BlendMode = BLEND_NORMAL;
m_bZBias = false;
m_fZBias = 0;
m_bClearZBuffer = false;
m_ZTestMode = ZTEST_OFF;
m_bZWrite = false;
@@ -389,7 +389,10 @@ void Actor::SetGlobalRenderStates()
// BLEND_NO_EFFECT is used to draw masks to the Z-buffer, which always wants
// Z-bias enabled.
DISPLAY->SetZBias( m_bZBias || m_BlendMode == BLEND_NO_EFFECT );
if( m_fZBias == 0 && m_BlendMode == BLEND_NO_EFFECT )
DISPLAY->SetZBias( 1.0f );
else
DISPLAY->SetZBias( m_fZBias );
if( m_bClearZBuffer )
DISPLAY->ClearZBuffer();