IT lexicon › Hardware › W-buffer

W-buffer

Hardware På svenska → Updated: 2026-10-27

A depth buffer that stores distance from the camera linearly instead of the hyperbolically distributed z/w a normal Z-buffer uses.

In a Z-buffer most of the precision is spent right in front of the camera; far away, wide ranges of distance collapse onto the same value and surfaces start shimmering through each other — z-fighting. A W-buffer stores view-space depth instead, the w component left over after projection, and so spreads precision evenly across the whole view.

Some graphics cards supported it in the late 1990s, and Direct3D exposed it as a separate mode. The catch is that w does not vary linearly across the screen, so the value has to be perspective-corrected per pixel, which fights with depth compression and early depth tests. Modern hardware let it die; floating-point reversed Z and the logarithmic depth buffer solve the same problem more cheaply.

← Back to the lexicon