Skip to main content

Module directx

Module directx 

Source
Expand description

DirectX and WebGPU NDC convention: Z range [0, 1], Y-up.

Expects a right-handed Y-up view space input.

Includes standard, infinite-far, and reverse-depth variants.

Functionsยง

frustum
Creates a perspective projection from a frustum for use with DirectX and WebGPU.
orthographic
Creates an orthographic projection matrix for use with DirectX and WebGPU.
perspective
Creates a perspective projection matrix for use with DirectX and WebGPU.
perspective_infinite
Creates an infinite perspective projection matrix for use with DirectX and WebGPU.
perspective_infinite_reverse
Creates an infinite perspective projection matrix with reversed depth for use with DirectX and WebGPU.