# ComputeSpotShadowMatricesAndCullingPrimitives(int, out Matrix4x4, out Matrix4x4, out ShadowSplitData)

> Calculates the view and projection matrices and shadow split data for a spot light.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Rendering](/engine/6000.3/script-reference/unityengine/rendering.md)
* **Assembly:** UnityEngine.CoreModule

## ComputeSpotShadowMatricesAndCullingPrimitives(int, Matrix4x4, Matrix4x4, ShadowSplitData)

```csharp
public bool ComputeSpotShadowMatricesAndCullingPrimitives(int activeLightIndex, out Matrix4x4 viewMatrix, out Matrix4x4 projMatrix, out ShadowSplitData shadowSplitData)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The index into the active light array.**** (\[Matrix4x4]\(/engine/6000.3/script-reference/unityengine/matrix4x4)): The computed view matrix.**** (\[Matrix4x4]\(/engine/6000.3/script-reference/unityengine/matrix4x4)): The computed projection matrix.**** (\[ShadowSplitData]\(/engine/6000.3/script-reference/unityengine/rendering/shadowsplitdata)): The computed split data.

### Returns

| Type                                                          | Description                                                                      |
| ------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | If false, the shadow map for this light does not need to be rendered this frame. |

### Remarks

Additional Resources: [ShadowSplitData](/engine/6000.3/script-reference/unityengine/rendering/shadowsplitdata.md).
