IT lexicon › Programming › Normalized device coordinates (NDC)

Normalized device coordinates (NDC)

Programming På svenska → Updated: 2026-10-26

The cube-shaped coordinate space after the perspective divide, where everything visible lives in a range around zero — independent of the screen's resolution.

Once a vertex has passed the projection it sits in clip space with four components. The GPU then divides x, y and z by w — the perspective divide — and lands in NDC. In OpenGL the space is a cube from −1 to 1 on all three axes; in Direct3D and Vulkan the depth runs from 0 to 1 instead.

The point is that everything visible now lives in a fixed, resolution-independent range. The viewport then maps x and y to real pixel coordinates. Clipping is deliberately done back in clip space, before the divide, because dividing by a w that is zero or negative would otherwise turn the geometry inside out.

← Back to the lexicon