Class DrawObjectsPass
Draw objects into the given color and depth target
You can use this pass to render objects that have a material and/or shader with the pass names UniversalForward or SRPDefaultUnlit.
Inherited Members
Namespace: UnityEngine.Rendering.Universal.Internal
Assembly: Unity.RenderPipelines.Universal.Runtime.dll
Syntax
public class DrawObjectsPass : ScriptableRenderPass
Constructors
DrawObjectsPass(string, bool, RenderPassEvent, RenderQueueRange, LayerMask, StencilState, int)
Declaration
public DrawObjectsPass(string profilerTag, bool opaque, RenderPassEvent evt, RenderQueueRange renderQueueRange, LayerMask layerMask, StencilState stencilState, int stencilReference)
Parameters
Type | Name | Description |
---|---|---|
string | profilerTag | |
bool | opaque | |
RenderPassEvent | evt | |
RenderQueueRange | renderQueueRange | |
LayerMask | layerMask | |
StencilState | stencilState | |
int | stencilReference |
DrawObjectsPass(string, ShaderTagId[], bool, RenderPassEvent, RenderQueueRange, LayerMask, StencilState, int)
Declaration
public DrawObjectsPass(string profilerTag, ShaderTagId[] shaderTagIds, bool opaque, RenderPassEvent evt, RenderQueueRange renderQueueRange, LayerMask layerMask, StencilState stencilState, int stencilReference)
Parameters
Type | Name | Description |
---|---|---|
string | profilerTag | |
ShaderTagId[] | shaderTagIds | |
bool | opaque | |
RenderPassEvent | evt | |
RenderQueueRange | renderQueueRange | |
LayerMask | layerMask | |
StencilState | stencilState | |
int | stencilReference |
Fields
m_IsActiveTargetBackBuffer
Used to indicate if the active target of the pass is the back buffer
Declaration
public bool m_IsActiveTargetBackBuffer
Field Value
Type | Description |
---|---|
bool |
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
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 |