normal

fun normal(m: Mat4): Mat4

Returns the normal matrix for m.

The normal matrix is the transpose-inverse of the upper-left 3×3 of the model matrix, used to correctly transform normals when non-uniform scaling is present.

Return

the normal transform matrix

Parameters

m

the model matrix