W Pleasure, W Fun

The whole point of doing 3D graphics is the third dimension. Since the screen is only two-dimensional, the third dimension appears only indirectly in terms of perspective and occlusion. Correct occlusion testing is, however, fairly sensitive to precision problems in the depth calculation. I review the traditional way to represent depth and describe a new technique that appears in the new generation of 3D graphics boards. This technique has become practical as a side effect of perspective-correct texture mapping hardware. Both ways have their good and bad points, so I establish some rules of thumb on which method to choose in a given situation.