Class DrawRenderersCustomPass
DrawRenderers Custom Pass
Inherited Members
Namespace: UnityEngine.Rendering.HighDefinition
Syntax
[Serializable]
public class DrawRenderersCustomPass : CustomPass, IVersionable<CustomPass.Version>
Fields
depthCompareFunction
Overrides the Depth comparison function, only used when overrideDepthState is true.
Declaration
public CompareFunction depthCompareFunction
Field Value
Type | Description |
---|---|
CompareFunction |
depthWrite
Overrides the Depth write, only used when overrideDepthState is true.
Declaration
public bool depthWrite
Field Value
Type | Description |
---|---|
Boolean |
layerMask
Layer Mask filter, select which layer to render.
Declaration
public LayerMask layerMask
Field Value
Type | Description |
---|---|
LayerMask |
overrideDepthState
When true, overrides the depth state of the objects.
Declaration
public bool overrideDepthState
Field Value
Type | Description |
---|---|
Boolean |
overrideMaterial
Replaces the material of selected renders by this one, be sure to also set overrideMaterialPassName to a good value when using this property.
Declaration
public Material overrideMaterial
Field Value
Type | Description |
---|---|
Material |
overrideMaterialPassName
Select which pass will be used to render objects when using an override material.
Declaration
public string overrideMaterialPassName
Field Value
Type | Description |
---|---|
String |
renderQueueType
Render Queue filter to select which kind of object to render.
Declaration
public CustomPass.RenderQueueType renderQueueType
Field Value
Type | Description |
---|---|
CustomPass.RenderQueueType |
shaderPass
Set the shader pass to use when the override material is null
Declaration
public DrawRenderersCustomPass.ShaderPass shaderPass
Field Value
Type | Description |
---|---|
DrawRenderersCustomPass.ShaderPass |
sortingCriteria
Sorting flags of the objects to render.
Declaration
public SortingCriteria sortingCriteria
Field Value
Type | Description |
---|---|
SortingCriteria |
Methods
AggregateCullingParameters(ref ScriptableCullingParameters, HDCamera)
Use this method if you want to draw objects that are not visible in the camera. For example if you disable a layer in the camera and add it in the culling parameters, then the culling result will contains your layer.
Declaration
protected override void AggregateCullingParameters(ref ScriptableCullingParameters cullingParameters, HDCamera hdCamera)
Parameters
Type | Name | Description |
---|---|---|
ScriptableCullingParameters | cullingParameters | Aggregate the parameters in this property (use |= for masks fields, etc.) |
HDCamera | hdCamera | The camera where the culling is being done |
Overrides
Execute(CustomPassContext)
Execute the DrawRenderers with parameters setup from the editor
Declaration
protected override void Execute(CustomPassContext ctx)
Parameters
Type | Name | Description |
---|---|---|
CustomPassContext | ctx | The context of the custom pass. Contains command buffer, render context, buffer, etc. |
Overrides
RegisterMaterialForInspector()
List all the materials that need to be displayed at the bottom of the component. All the materials gathered by this method will be used to create a Material Editor and then can be edited directly on the custom pass.
Declaration
public override IEnumerable<Material> RegisterMaterialForInspector()
Returns
Type | Description |
---|---|
IEnumerable<Material> | An enumerable of materials to show in the inspector. These materials can be null, the list is cleaned afterwards |
Overrides
Setup(ScriptableRenderContext, CommandBuffer)
Called before the first execution of the pass occurs. Allow you to allocate custom buffers.
Declaration
protected override void Setup(ScriptableRenderContext renderContext, CommandBuffer cmd)
Parameters
Type | Name | Description |
---|---|---|
ScriptableRenderContext | renderContext | The render context |
CommandBuffer | cmd | Current command buffer of the frame |