Mat4:fov

Edit

Sets a projection matrix using raw projection angles and clipping planes.

This can be used for asymmetric or oblique projections.

self = Mat4:fov(left, right, up, down, near, far)

Arguments

NameTypeDefaultDescription
leftnumber The left half-angle of the projection, in radians.
rightnumber The right half-angle of the projection, in radians.
upnumber The top half-angle of the projection, in radians.
downnumber The bottom half-angle of the projection, in radians.
nearnumber The near plane of the projection.
farnumber0 The far plane. Zero is a special value that will set an infinite far plane with a reversed Z range, which improves depth buffer precision and is the default.

Returns

NameTypeDescription
selfMat4 The modified matrix.

See also