The Projection matrix

At the beginning of this chapter, we learned that the Projection matrix combines the projection transformation and the perspective division. These two steps take a 3D scene and convert it into a cube, which is then mapped to the 2D canvas by the viewport transformation.

In practice, the Projection matrix determines the geometry of the image that is captured by the camera. In a real-world camera, the lens of the camera would determine how distorted the final images are. In a WebGL world, we use the Projection matrix to simulate that effect. Also, unlike in the real world where our images are always affected by perspective, in WebGL, we can pick a different representation (such as the orthographic projection).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.103.8