IT lexicon › Hardware › Occlusion query

Occlusion query

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

A GPU query that counts how many pixels an object would actually draw, so the engine can skip it when the answer is zero — the basis of hardware occlusion culling.

You draw the object's bounding box without shading it, and the GPU reports how many fragments passed the depth test. Zero means fully hidden — so the expensive real geometry never needs to be submitted. The ARB_occlusion_query extension standardised the technique in OpenGL around 2003, following earlier HP and NVIDIA vendor extensions.

The catch is latency: the answer only arrives once the GPU has drawn, and reading it immediately forces the CPU to wait on the GPU — a stall that eats the whole saving. The fix is to use last frame's result, or "conditional rendering", where the GPU gates the draw on the result itself with no round trip. Hi-Z often does the same job more cheaply.

← Back to the lexicon