IT lexicon › Hardware › Depth prepass

Depth prepass

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

A first render pass that fills only the depth buffer, so the expensive colour pass never shades a pixel that ends up hidden.

Also called a z-prepass. The scene is drawn once writing depth only, no colour. The second pass then renders colour with the depth test set to equal, so a fragment shader runs exactly once per visible pixel — overdraw of expensive shading falls to zero.

It pays off when pixel shaders are heavy and overdraw is high; it's wasted when geometry is the bottleneck, since the vertex cost is then paid twice. The pass also primes early-Z and hierarchical-Z for the colour pass. A staple of forward and forward+ renderers; deferred shading gets the same benefit for free out of its G-buffer.

← Back to the lexicon