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.

Image

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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.