lovr.graphics.getProjection
Returns the projection for a single view.
left, right, up, down = lovr.graphics.getProjection(view)
Arguments
Name | Type | Description |
view | number | The view index.
|
Returns
Name | Type | Description |
left | number | The left field of view angle, in radians.
|
right | number | The right field of view angle, in radians.
|
up | number | The top field of view angle, in radians.
|
down | number | The bottom field of view angle, in radians.
|
matrix = lovr.graphics.getProjection(view, matrix)
Arguments
Name | Type | Description |
view | number | The view index.
|
matrix | Mat4 | The matrix to fill with the projection.
|
Returns
Name | Type | Description |
matrix | Mat4 | The matrix containing the projection.
|
Notes
Non-stereo rendering will only use the first view.
The projection matrices are available as the mat4 lovrProjections[2]
variable in shaders. The current projection matrix is available as lovrProjection
.
See also
lovr.headset.getViewAngles
lovr.headset.getViewCount
lovr.graphics.getViewPose
lovr.graphics.setViewPose
lovr.graphics.setProjection
lovr.graphics