Class CullContextData
Class that holds data related to culling.
Inherited Members
Namespace: UnityEngine.Rendering.Universal
Assembly: Unity.RenderPipelines.Core.Runtime.dll
Syntax
public class CullContextData : ContextItem
Methods
Cull(ref ScriptableCullingParameters)
Performs scene culling based on the provided parameters.
Declaration
public CullingResults Cull(ref ScriptableCullingParameters parameters)
Parameters
| Type | Name | Description |
|---|---|---|
| ScriptableCullingParameters | parameters | The parameters used for the culling. |
Returns
| Type | Description |
|---|---|
| CullingResults | The culling results. |
CullShadowCasters(CullingResults, ShadowCastersCullingInfos)
Performs shadow casters culling based on the provided parameters.
Declaration
public void CullShadowCasters(CullingResults cullingResults, ShadowCastersCullingInfos shadowCastersCullingInfos)
Parameters
| Type | Name | Description |
|---|---|---|
| CullingResults | cullingResults | The scene culling results. |
| ShadowCastersCullingInfos | shadowCastersCullingInfos | The shadow casters culling informations. |
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | The parameters used for the shadow culling. |
Reset()
Resets the object so it can be used as a new instance next time it is created. To avoid memory allocations and generating garbage, the system reuses objects. This function should clear the object so it can be reused without leaking any information (e.g. pointers to objects that will no longer be valid to access). So it is important the implementation carefully clears all relevant members. Note that this is different from a Dispose or Destructor as the object in not freed but reset. This can be useful when havin large sub-allocated objects like arrays or lists which can be cleared and reused without re-allocating.
Declaration
public override void Reset()
Overrides
SetRenderContext(in ScriptableRenderContext)
Assigns the render context once at initialization time.
Declaration
public void SetRenderContext(in ScriptableRenderContext renderContext)
Parameters
| Type | Name | Description |
|---|---|---|
| ScriptableRenderContext | renderContext | The render context to assign. |