In GLSL, there are some situations where a vector or point in a local coordinate system needs to be converted to a viewpoint coordinate system, such as illumination calculation, which needs to be transformed into a viewpoint coordinate system . If a point p in the model is converted to a viewpoint coordinate system, the direct (Model-view matrix) *p can be, but the normals are vectors, not a point, and cannot do so. We need to use a line matrix to transform normals.
Normal matrix:
The normal matrix is usually the reversal matrix (inverse transpose) of the upper-left corner of the model viewpoint matrix (Model-view matrix) of the 3x3 matrix.
But if our Model-view matrix does not contain any non-uniform scaling (non-uniform scalings), then we can directly use the upper-left-corner 3x3 matrix of the Model-view matrix as the normal matrix to convert normal.
OpenGL Super Treasure 5th edition &&GLSL normal transform