Class DepthNormalOnlyPass
Render all objects that have a 'DepthNormals' and/or 'DepthNormalsOnly' pass into the given depth and normal buffers.
Inherited Members
Namespace: UnityEngine.Rendering.Universal.Internal
Assembly: Unity.RenderPipelines.Universal.Runtime.dll
Syntax
public class DepthNormalOnlyPass : ScriptableRenderPass
Constructors
DepthNormalOnlyPass(RenderPassEvent, RenderQueueRange, LayerMask)
Creates a new DepthNormalOnlyPass
instance.
Declaration
public DepthNormalOnlyPass(RenderPassEvent evt, RenderQueueRange renderQueueRange, LayerMask layerMask)
Parameters
Type | Name | Description |
---|---|---|
RenderPassEvent | evt | The |
RenderQueueRange | renderQueueRange | The |
LayerMask | layerMask | The layer mask to use for creating filtering settings that control what objects get rendered. |
See Also
Methods
Execute(ScriptableRenderContext, ref RenderingData)
Execute the pass. This is where custom rendering occurs. Specific details are left to the implementation
Declaration
public override void Execute(ScriptableRenderContext context, ref RenderingData renderingData)
Parameters
Type | Name | Description |
---|---|---|
ScriptableRenderContext | context | Use this render context to issue any draw commands during execution |
RenderingData | renderingData | Current rendering state information |
Overrides
GetGraphicsFormat()
Finds the format to use for the normals texture.
Declaration
public static GraphicsFormat GetGraphicsFormat()
Returns
Type | Description |
---|---|
GraphicsFormat | The GraphicsFormat to use with the Normals texture. |
OnCameraCleanup(CommandBuffer)
Called upon finish rendering a camera. You can use this callback to release any resources created by this render pass that need to be cleanup once camera has finished rendering. This method be called for all cameras in a camera stack.
Declaration
public override void OnCameraCleanup(CommandBuffer cmd)
Parameters
Type | Name | Description |
---|---|---|
CommandBuffer | cmd | Use this CommandBuffer to cleanup any generated data |
Overrides
OnCameraSetup(CommandBuffer, ref RenderingData)
This method is called by the renderer before rendering a camera
Override this method if you need to to configure render targets and their clear state, and to create temporary render target textures.
If a render pass doesn't override this method, this render pass renders to the active Camera's render target.
You should never call CommandBuffer.SetRenderTarget. Instead call ConfigureTarget
and ConfigureClear
.
Declaration
public override void OnCameraSetup(CommandBuffer cmd, ref RenderingData renderingData)
Parameters
Type | Name | Description |
---|---|---|
CommandBuffer | cmd | CommandBuffer to enqueue rendering commands. This will be executed by the pipeline. |
RenderingData | renderingData | Current rendering state information |
Overrides
See Also
Setup(RTHandle, RTHandle)
Configures the pass.
Declaration
public void Setup(RTHandle depthHandle, RTHandle normalHandle)
Parameters
Type | Name | Description |
---|---|---|
RTHandle | depthHandle | The |
RTHandle | normalHandle | The |
See Also
Setup(RTHandle, RTHandle, RTHandle)
Configure the pass
Declaration
public void Setup(RTHandle depthHandle, RTHandle normalHandle, RTHandle decalLayerHandle)
Parameters
Type | Name | Description |
---|---|---|
RTHandle | depthHandle | The |
RTHandle | normalHandle | The |
RTHandle | decalLayerHandle | The |