ComputeDirectionalShadowMatricesAndCullingPrimitives(int, int, int, Vector3, int, float, out Matrix4x4, out Matrix4x4, out ShadowSplitData)
Calculates the view and projection matrices and shadow split data for a directional light.
Read time 1 minuteLast updated 13 days ago
Definition
- Type: Method
- Namespace: UnityEngine.Rendering
- Assembly: UnityEngine.CoreModule
ComputeDirectionalShadowMatricesAndCullingPrimitives(int, int, int, Vector3, int, float, Matrix4x4, Matrix4x4, ShadowSplitData)
public bool ComputeDirectionalShadowMatricesAndCullingPrimitives(int activeLightIndex, int splitIndex, int splitCount, Vector3 splitRatio, int shadowResolution, float shadowNearPlaneOffset, out Matrix4x4 viewMatrix, out Matrix4x4 projMatrix, out ShadowSplitData shadowSplitData)
Parameters
The index into the active light array.
The cascade index.
The number of cascades.
The cascade ratios.
The resolution of the shadowmap.
The near plane offset for the light.
The computed view matrix.
The computed projection matrix.
The computed cascade data.
Returns
Type | Description |
|---|---|
| bool | If false, the shadow map for this cascade does not need to be rendered this frame. |
Remarks
Additional Resources: ShadowSplitData.