3
$\begingroup$

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?

$\endgroup$
1
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ 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? $\endgroup$ – transporter_room_3 Mar 14 '17 at 10:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.