SetObjectDepthBias

Description

Sets the depth bias when drawing this object to the screen. If two objects are very close together, one in front of the other, they can cause Z fighting where they appear to flicker between one object and the other being displayed in front of each other. For example a decal on the surface of another object. Z bias is designed to prevent this flickering by forcing (biasing) one object to always be in front of, or behind, the other. The bias value should be positive to bring this object towards the camera, and negative to push it backwards. This does not actually affect the position of the object, only its perceived position when the rendering system tests to see if the object should be drawn or not. If the object passes this biased depth test then it is drawn at its original position. The bias value is in multiples of the smallest z buffer value, so a bias value of 1 is the recommended value. Values smaller than this are not likely to have any effect, values bigger than this can be tried if a value of 1 does not work, try 1.5, 2.0, etc.

Definition

SetObjectDepthBias( objID, bias )

Parameters