Mat4:perspective
Sets this matrix to represent a perspective projection.
This can be used with lovr.graphics.setProjection
, or it can be sent to a Shader
for use in GLSL.
m = Mat4:perspective(near, far, fov, aspect)
Arguments
Name | Type | Description |
near | number | The near plane. |
far | number | The far plane. |
fov | number | The field of view (in radians). |
aspect | number | The vertical aspect ratio of the projection. |
Returns
Name | Type | Description |
m | Mat4 | The original matrix. |
See also
Mat4:orthographic
Mat4:fov
lovr.graphics.setProjection
Mat4