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)
Creates a new DrawObjectsPass
instance.
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 |
See Also
DrawObjectsPass(string, ShaderTagId[], bool, RenderPassEvent, RenderQueueRange, LayerMask, StencilState, int)
Creates a new DrawObjectsPass
instance.
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 | The |
RenderQueueRange | renderQueueRange | |
LayerMask | layerMask | |
StencilState | stencilState | |
int | stencilReference |
See Also
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 |
m_ShouldTransparentsReceiveShadows
Used to indicate whether transparent objects should receive shadows or not.
Declaration
public bool m_ShouldTransparentsReceiveShadows
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
OnExecute(CommandBuffer)
Called before ExecutePass draws the objects.
Declaration
protected virtual void OnExecute(CommandBuffer cmd)
Parameters
Type | Name | Description |
---|---|---|
CommandBuffer | cmd | The command buffer to use. |