June 2013
Intermediate to advanced
346 pages
8h 42m
English
Perspective projections work somewhat differently. They also map part of the virtual world onto the screen, but they do so by using perspective: the further away something is, the smaller it will appear on the screen. The projection matrix can’t do this by itself, so it uses a fourth component, w, in conjunction with the perspective divide. You can read more in Perspective Division.
The following is a very basic perspective projection matrix. This matrix assumes a right-handed coordinate space (see Left-Handed and Right-Handed Coordinate Systems), with the near plane beginning at a z of -1. As a quick exercise, see if you can guess where the far end lies, remembering that OpenGL will divide each component ...
Read now
Unlock full access