Appendix E. The Inverse Transpose Matrix

The inverse transpose matrix, previously introduced in Chapter 8, “Lighting Objects,” is a matrix that determines the inverse of a given matrix and then transposes it. As shown in Figure E.1, the direction of the normal vector of an object is subject to change depending on the type of the coordinate transformation. However, if you use the inverse transpose of the model matrix, you can safely ignore this in calculations.


Figure E.1 The direction of normal vector changes along with the coordinate transformation

In Chapter 8, you saw how to use the inverse transpose of the model matrix to transform normals. ...

Get WebGL Programming Guide: Interactive 3D Graphics Programming with WebGL now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.