Alias defPerspective

Build a perspective projection matrix with default NDC and DepthClip

alias defPerspective = perspectiveCT!defNdc;

Parameters

NameDescription
fovx horizontal field of view in degrees
aspect aspect ratio (width / height)
near position of the near plane
far position of the far plane

Returns

a matrix that maps from eye space to clip space. To obtain NDC, the vector must be divided by w.