Microsoft DirectX 8.1 (Visual Basic)

Changing Depth Buffer Comparison Functions

By default, when depth testing is performed on a rendering surface, the Microsoft® Direct3D® system updates the render-target surface if the corresponding depth value (z or w) for each point is less than the value in the depth buffer. In Microsoft® Visual Basic®, you can change how the system performs comparisons on depth values by calling the Direct3DDevice8.SetRenderState method with the State parameter set to D3DRS_ZFUNC. The Value parameter should be set to a value in the CONST_D3DCMPFUNC enumeration.