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:
@@ -1517,12 +1517,12 @@ void RageDisplay_OGL::SetZWrite( bool b )
|
||||
glDepthMask( b );
|
||||
}
|
||||
|
||||
void RageDisplay_OGL::SetZBias( bool b )
|
||||
void RageDisplay_OGL::SetZBias( float f )
|
||||
{
|
||||
if( b )
|
||||
glDepthRange( 0.0, 0.95 );
|
||||
else
|
||||
glDepthRange( 0.05, 1.0 );
|
||||
float fNear = SCALE( f, 0.0f, 1.0f, 0.05f, 0.0f );
|
||||
float fFar = SCALE( f, 0.0f, 1.0f, 1.0f, 0.95f );
|
||||
|
||||
glDepthRange( fNear, fFar );
|
||||
}
|
||||
|
||||
void RageDisplay_OGL::SetZTestMode( ZTestMode mode )
|
||||
|
||||
Reference in New Issue
Block a user