Skip to main content

perspective

Function perspective 

Source
pub fn perspective(fov_y: Real, aspect: Real, near: Real, far: Real) -> Mat4
Expand description

Create a perspective projection matrix (right-handed, depth [0, 1]).

  • fov_y - Vertical field of view in radians.
  • aspect - Width / height ratio.
  • near - Near clipping plane distance (positive).
  • far - Far clipping plane distance (positive).