You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking through the matrix functions, I didn't see any functions that returns the adjoint of a matrix. Although it looks like the inverse functions are computing the adjoint as preliminary step.
The adjoint of a matrix is useful for things like computing a matrix for transforming lighting normals. "Real-Time Rendering, 3rd edition" pg.63, suggests to use the transpose of the adjoint of the model-view matrix for correctly transforming lighting normals. As glm currently stands, only the inverse method is available for this, which returns the input matrix's adjoint divided by the input matrix's determinant.
If an adjoint function was available it could be used instead of the inverse function to more efficiently compute the normal matrix by removing the unncessary division by the matrix's determinant.
The text was updated successfully, but these errors were encountered:
@Groovounet , I think this implementation of adjugate is actually transposed.
If i'm not mistaken, dividng the adjugate by the determinant of the matrix is supposed to equal the inverse of the matrix. inv(A) == (1 / det(A)) * Adj(A)
Looking through the matrix functions, I didn't see any functions that returns the adjoint of a matrix. Although it looks like the inverse functions are computing the adjoint as preliminary step.
The adjoint of a matrix is useful for things like computing a matrix for transforming lighting normals. "Real-Time Rendering, 3rd edition" pg.63, suggests to use the transpose of the adjoint of the model-view matrix for correctly transforming lighting normals. As glm currently stands, only the inverse method is available for this, which returns the input matrix's adjoint divided by the input matrix's determinant.
If an adjoint function was available it could be used instead of the inverse function to more efficiently compute the normal matrix by removing the unncessary division by the matrix's determinant.
The text was updated successfully, but these errors were encountered: