Class CustomPassVolume
Unity Monobehavior that manages the execution of custom passes. It provides
Implements
Inherited Members
Namespace: UnityEngine.Rendering.HighDefinition
Assembly: Unity.RenderPipelines.HighDefinition.Runtime.dll
Syntax
[ExecuteAlways]
public class CustomPassVolume : MonoBehaviour, IVolume
Fields
Name | Description |
---|---|
customPasses | List of custom passes to execute |
fadeRadius | Distance where the volume start to be rendered, the fadeValue field in C# will be updated to the normalized blend factor for your custom C# passes In the fullscreen shader pass and DrawRenderers shaders you can access the _FadeValue |
injectionPoint | Where the custom passes are going to be injected in HDRP |
priority | The volume priority, used to determine the execution order when there is multiple volumes with the same injection point. Custom Pass Volume with a higher value is rendered first. |
Properties
Name | Description |
---|---|
colliders | The colliders of the volume if isGlobal is false |
fadeValue | Fade value between 0 and 1. it represent how close you camera is from the collider of the custom pass. 0 when the camera is outside the volume + fade radius and 1 when it is inside the collider. |
isGlobal | Whether or not the volume is global. If true, the component will ignore all colliders attached to it |
targetCamera | Use this field to force the custom pass volume to be executed only for one camera. |
Methods
Name | Description |
---|---|
AddPassOfType(Type) | Add a pass of type passType in the active pass list |
AddPassOfType<T>() | Add a pass of type passType in the active pass list |
GetActivePassVolume(CustomPassInjectionPoint) | Gets the currently active Custom Pass Volume for a given injection point. Note this function returns only the first active volume, not the others that will be executed. |
GetActivePassVolumes(CustomPassInjectionPoint, List<CustomPassVolume>) | Gets the currently active Custom Pass Volume for a given injection point. |