Class RenderObjectsPass
The scriptable render pass used with the render objects renderer feature.
Inherited Members
Namespace: UnityEngine.Experimental.Rendering.Universal
Assembly: Unity.RenderPipelines.Universal.Runtime.dll
Syntax
public class RenderObjectsPass : ScriptableRenderPass
Constructors
RenderObjectsPass(string, RenderPassEvent, string[], RenderQueueType, int, CustomCameraSettings)
The constructor for render objects pass.
Declaration
public RenderObjectsPass(string profilerTag, RenderPassEvent renderPassEvent, string[] shaderTags, RenderQueueType renderQueueType, int layerMask, RenderObjects.CustomCameraSettings cameraSettings)
Parameters
Type | Name | Description |
---|---|---|
string | profilerTag | The profiler tag used with the pass. |
RenderPassEvent | renderPassEvent | Controls when the render pass executes. |
string[] | shaderTags | List of shader tags to render with. |
RenderQueueType | renderQueueType | The queue type for the objects to render. |
int | layerMask | The layer mask to use for creating filtering settings that control what objects get rendered. |
RenderObjects.CustomCameraSettings | cameraSettings | The settings for custom cameras values. |
Properties
overrideMaterial
The override material to use.
Declaration
public Material overrideMaterial { get; set; }
Property Value
Type | Description |
---|---|
Material |
overrideMaterialPassIndex
The pass index to use with the override material.
Declaration
public int overrideMaterialPassIndex { get; set; }
Property Value
Type | Description |
---|---|
int |
overrideShader
The override shader to use.
Declaration
public Shader overrideShader { get; set; }
Property Value
Type | Description |
---|---|
Shader |
overrideShaderPassIndex
The pass index to use with the override shader.
Declaration
public int overrideShaderPassIndex { get; set; }
Property Value
Type | Description |
---|---|
int |
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
RecordRenderGraph(RenderGraph, FrameResources, ref RenderingData)
Record the render graph pass. This is where custom rendering occurs. Specific details are left to the implementation
Declaration
public override void RecordRenderGraph(RenderGraph renderGraph, FrameResources frameResources, ref RenderingData renderingData)
Parameters
Type | Name | Description |
---|---|---|
RenderGraph | renderGraph | |
FrameResources | frameResources | |
RenderingData | renderingData |
Overrides
SetDepthState(bool, CompareFunction)
Sets the write and comparison function for depth.
Declaration
public void SetDepthState(bool writeEnabled, CompareFunction function = CompareFunction.Less)
Parameters
Type | Name | Description |
---|---|---|
bool | writeEnabled | Sets whether it should write to depth or not. |
CompareFunction | function | The depth comparison function to use. |
SetStencilState(int, CompareFunction, StencilOp, StencilOp, StencilOp)
Sets up the stencil settings for the pass.
Declaration
public void SetStencilState(int reference, CompareFunction compareFunction, StencilOp passOp, StencilOp failOp, StencilOp zFailOp)
Parameters
Type | Name | Description |
---|---|---|
int | reference | The stencil reference value. |
CompareFunction | compareFunction | The comparison function to use. |
StencilOp | passOp | The stencil operation to use when the stencil test passes. |
StencilOp | failOp | The stencil operation to use when the stencil test fails. |
StencilOp | zFailOp | The stencil operation to use when the stencil test fails because of depth. |