Function ultraviolet::projection::rh_ydown::perspective_wgpu_dx[][src]

pub fn perspective_wgpu_dx(
    vertical_fov: f32,
    aspect_ratio: f32,
    z_near: f32,
    z_far: f32
) -> Mat4

Perspective projection matrix meant to be used with WebGPU or DirectX.

  • vertical_fov should be provided in radians.
  • aspect_ratio should be the quotient width / height.

This matrix is meant to be used when the source coordinate space is right-handed and y-down (the standard computer graphics coordinate space) and the destination coordinate space is left-handed and y-up with Z (depth) clip extending from 0.0 (close) to 1.0 (far).