Class CustomPass
Class that holds data and logic for the pass to be executed
Implements
Inherited Members
Namespace: UnityEngine .Rendering.HighDefinition
Assembly: Unity.RenderPipelines.HighDefinition.Runtime.dll
Syntax
[Serializable]
public abstract class CustomPass : IVersionable<CustomPass.Version>
Fields
Name | Description |
---|---|
clear |
What clear to apply when the color and depth buffer are bound |
enabled | Is the custom pass enabled or not |
target |
Target color buffer (Camera or Custom) |
target |
Target depth buffer (camera or custom) |
Properties
Name | Description |
---|---|
execute |
True if you want your custom pass to be executed in the scene view. False for game cameras only. |
fade |
Mirror of the value in the CustomPassVolume where this custom pass is listed |
injection |
Get the injection point in HDRP where this pass will be executed |
name | Name of the custom pass |
Methods
Name | Description |
---|---|
Aggregate |
Use this method if you want to draw objects that are not visible in the camera. For example if you disable a layer in the camera and add it in the culling parameters, then the culling result will contains your layer. |
Cleanup() | Called when HDRP is destroyed. Allow you to free custom buffers. |
Create |
Create a Custom Pass to render objects |
Create |
Create a custom pass to execute a fullscreen pass |
Execute(Custom |
Called when your pass needs to be executed by a camera |
Execute(Scriptable |
Called when your pass needs to be executed by a camera |
~Custom |
Cleans up the custom pass when Unity destroys it unexpectedly. Currently, this happens every time you edit the UI because of a bug with the SerializeReference attribute. |
Get |
Get the current camera buffers (can be MSAA) |
Get |
Get the current custom buffers |
Get |
Get the current normal buffer (can be MSAA) |
Get |
Returns the render queue range associated with the custom render queue type |
Register |
List all the materials that need to be displayed at the bottom of the component. All the materials gathered by this method will be used to create a Material Editor and then can be edited directly on the custom pass. |
Resolve |
Resolve the camera color buffer only if the MSAA is enabled and the pass is executed in before transparent. |
Resolve |
Resolve the camera color buffer only if the MSAA is enabled and the pass is executed in before transparent. |
Set |
Bind the camera color buffer as the current render target |
Set |
Bind the custom color buffer as the current render target |
Set |
Bind the render targets according to the parameters of the UI (targetColorBuffer, targetDepthBuffer and clearFlags) |
Setup(Scriptable |
Called before the first execution of the pass occurs. Allow you to allocate custom buffers. |