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
Name | Type | Description |
left | number | The left edge of the projection. |
right | number | The right edge of the projection. |
top | number | The top edge of the projection. |
bottom | number | The bottom edge of the projection. |
near | number | The position of the near clipping plane. |
far | number | The position of the far clipping plane. |
Returns
Name | Type | Description |
m | Mat4 | The original matrix. |
See also
Mat4:perspective
Mat4:fov
lovr.graphics.setProjection
Mat4