2011年10月1日 星期六

Nice website for normal matrix

When importing an object, both the vertices and normals are defined in Object Space. However, in the shader, if we want to do the calculation in camera space, we multiply the vertex with the Model View Matrix (M) to make it from object space to world space but we multiply (M^-1)^T
with the normal to make it from object space to world.

This article is pretty clear why there is the difference.

沒有留言:

張貼留言