Skip to main content

ortho

Function ortho 

Source
pub fn ortho(width: f32, height: f32) -> Mat4
Expand description

Creates a right-handed orthographic projection matrix.

ยงNote

When constructing orthographic projections, near must be less than far to ensure correct depth testing. Reversed depth (near > far) will cause back faces to be drawn over front faces, producing incorrect lighting.