June 2013
Intermediate to advanced
346 pages
8h 42m
English
To recreate the magic of 3D, our perspective projection matrix needs to work together with the perspective divide. The projection matrix can’t do the perspective divide by itself, and the perspective divide needs something to work with.
An object should move toward the center of the screen and decrease in size as it gets further away from us, so the most important task for our projection matrix is to create the proper values for w so that when OpenGL does the perspective divide, far objects will appear smaller than near objects. One of the ways that we can do that is by using the z component as the distance from the focal point and then mapping this distance to w. The greater the distance, the greater the w
Read now
Unlock full access