Class RenderObjectsPass
The scriptable render pass used with the render objects renderer feature.
Implements
Inherited Members
Namespace: UnityEngine.Rendering.Universal
Assembly: Unity.RenderPipelines.Universal.Runtime.dll
Syntax
[MovedFrom(true, "UnityEngine.Experimental.Rendering.Universal", null, null)]
public class RenderObjectsPass : ScriptableRenderPass, IRenderGraphRecorder
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
RecordRenderGraph(RenderGraph, ContextContainer)
Declaration
public override void RecordRenderGraph(RenderGraph renderGraph, ContextContainer frameData)
Parameters
Type | Name | Description |
---|---|---|
RenderGraph | renderGraph | |
ContextContainer | frameData |
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. |