# Getting from the default view volume to an image on the screen

I don't completely understand the last part of the MVP matrix (projection).

In orthographic projection we simply scale the view volume into the default view volume (+-1 on all axis).

In perspective projection we scale and skew the view frustrum into the default view volume (+-1 on all axis) which causes non-uniform foreshortening giving the appearance of perspective that we're used to.

So now, regardless of which type of projection we have used, we have the default viewing volume (+-1 on all axis). So how do we get from this cube to an image on the screen?

I understand that we need this volume for the z-buffer. But how are points (anywhere in this volume) finally transformed from 3d to 2d and is it the same procedure for orthographic projection as it is for perspective projection?

## 1 Answer

The mapping from NDC space to screen space is orthographic.

The x is mapped linearly from [-1, 1] to [0,viewport width], same with y and viewport height.

This mapping happens after the projection matrix has been applied and the divide by w happened.

• So the divide by w brings the 4d coordinates to 3d and then the 3d points are orthographically projected to 2d? So a perspective projection really also encompasses a final orthographic projection? Mar 14, 2017 at 10:08