Mat4:orthographic

Sets this matrix to represent an orthographic projection, useful for 2D/isometric rendering.

This can be used with lovr.graphics.setProjection, or it can be sent to a Shader for use in GLSL.

m = Mat4:orthographic(left, right, top, bottom, near, far)

Arguments

NameTypeDescription
leftnumberThe left edge of the projection.
rightnumberThe right edge of the projection.
topnumberThe top edge of the projection.
bottomnumberThe bottom edge of the projection.
nearnumberThe position of the near clipping plane.
farnumberThe position of the far clipping plane.

Returns

NameTypeDescription
mMat4The original matrix.

See also