Skip to content

Add matrix adjoint function #151

Closed
Closed
@dustin-biser

Description

@dustin-biser

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions