Method SetCameraMatrices
SetCameraMatrices(CommandBuffer, ref CameraData, bool)
Set camera matrices. This method will set UNITY_MATRIX_V
, UNITY_MATRIX_P
, UNITY_MATRIX_VP
to camera matrices.
Additionally this will also set unity_CameraProjection
and unity_CameraProjection
.
If setInverseMatrices
is set to true this function will also set UNITY_MATRIX_I_V
and UNITY_MATRIX_I_VP
.
This function has no effect when rendering in stereo. When in stereo rendering you cannot override camera matrices.
If you need to set general purpose view and projection matrices call SetViewAndProjectionMatrices(CommandBuffer, Matrix4x4, Matrix4x4, bool) instead.
Declaration
public static void SetCameraMatrices(CommandBuffer cmd, ref CameraData cameraData, bool setInverseMatrices)
Parameters
Type | Name | Description |
---|---|---|
CommandBuffer | cmd | CommandBuffer to submit data to GPU. |
CameraData | cameraData | CameraData containing camera matrices information. |
bool | setInverseMatrices | Set this to true if you also need to set inverse camera matrices. |