Skip to main content

frustum

Function frustum 

Source
pub fn frustum(
    left: f64,
    right: f64,
    bottom: f64,
    top: f64,
    near: f64,
    far: f64,
) -> DMat4
Expand description

Creates a perspective projection from a frustum for use with Vulkan.

Expects a right-handed Y-up view space input. Outputs NDC with Z in [0, 1] and Y-down.

ยงPanics

Will panic if left is equal to right, if bottom is equal to top, or if near or far are less than or equal to zero, or if near is equal to far, when glam_assert is enabled.