toReversedProjectionMatrix method
void
toReversedProjectionMatrix(
- Matrix4 projectionMatrix
Implementation
void toReversedProjectionMatrix(Matrix4 projectionMatrix ) {
final m = projectionMatrix.storage;
final isPerspectiveMatrix = m[ 11 ] == - 1;
// Reverse [0, 1] projection matrix
if ( isPerspectiveMatrix ) {
m[ 10 ] = - m[ 10 ] - 1;
m[ 14 ] = - m[ 14 ];
}
else {
m[ 10 ] = - m[ 10 ];
m[ 14 ] = - m[ 14 ] + 1;
}
}