docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class DrawRenderersCustomPass

    DrawRenderers Custom Pass

    Inheritance
    object
    CustomPass
    DrawRenderersCustomPass
    ObjectIDCustomPass
    Implements
    IVersionable<CustomPass.Version>
    Inherited Members
    CustomPass.name
    CustomPass.enabled
    CustomPass.targetColorBuffer
    CustomPass.targetDepthBuffer
    CustomPass.clearFlags
    CustomPass.fadeValue
    CustomPass.injectionPoint
    CustomPass.executeInSceneView
    CustomPass.Execute(ScriptableRenderContext, CommandBuffer, HDCamera, CullingResults)
    CustomPass.Cleanup()
    CustomPass.SetCameraRenderTarget(CommandBuffer, bool, ClearFlag)
    CustomPass.SetCustomRenderTarget(CommandBuffer, bool, ClearFlag)
    CustomPass.SetRenderTargetAuto(CommandBuffer)
    CustomPass.ResolveMSAAColorBuffer(CommandBuffer, HDCamera)
    CustomPass.ResolveMSAAColorBuffer(CustomPassContext)
    CustomPass.GetCameraBuffers(out RTHandle, out RTHandle)
    CustomPass.GetCustomBuffers(out RTHandle, out RTHandle)
    CustomPass.GetNormalBuffer()
    CustomPass.GetRenderQueueRange(CustomPass.RenderQueueType)
    CustomPass.CreateFullScreenPass(Material, CustomPass.TargetBuffer, CustomPass.TargetBuffer)
    CustomPass.CreateDrawRenderersPass(CustomPass.RenderQueueType, LayerMask, Material, string, SortingCriteria, ClearFlag, CustomPass.TargetBuffer, CustomPass.TargetBuffer)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Rendering.HighDefinition
    Assembly: Unity.RenderPipelines.HighDefinition.Runtime.dll
    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
    bool

    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
    bool

    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

    overrideMode

    Controls how the material on each renderer will be replaced. Material mode uses overrideMaterial. Shader mode uses overrideShader.

    Declaration
    public DrawRenderersCustomPass.OverrideMaterialMode overrideMode
    Field Value
    Type Description
    DrawRenderersCustomPass.OverrideMaterialMode

    overrideShader

    Replaces the shader of selected renderers while using the current material properties.

    Declaration
    public Shader overrideShader
    Field Value
    Type Description
    Shader

    overrideShaderPassName

    Select whih pass will be used to render objects when using an override material.

    Declaration
    public string overrideShaderPassName
    Field Value
    Type Description
    string

    overrideStencil

    Override the stencil state of the objects.

    Declaration
    public bool overrideStencil
    Field Value
    Type Description
    bool

    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

    stencilCompareFunction

    Comparison operation between the stencil buffer and the reference value.

    Declaration
    public CompareFunction stencilCompareFunction
    Field Value
    Type Description
    CompareFunction

    stencilDepthFailOperation

    Operation to execute if the depth test fails.

    Declaration
    public StencilOp stencilDepthFailOperation
    Field Value
    Type Description
    StencilOp

    stencilFailOperation

    Operation to execute if the stencil test fails.

    Declaration
    public StencilOp stencilFailOperation
    Field Value
    Type Description
    StencilOp

    stencilPassOperation

    Operation to execute if the stencil test passes.

    Declaration
    public StencilOp stencilPassOperation
    Field Value
    Type Description
    StencilOp

    stencilReadMask

    Read mask of the stencil

    Declaration
    public int stencilReadMask
    Field Value
    Type Description
    int

    stencilReferenceValue

    Stencil reference value. Be careful when using this value to write in the stencil buffer to not overwrite HDRP stencil bits.

    Declaration
    public int stencilReferenceValue
    Field Value
    Type Description
    int

    stencilWriteMask

    Write mask of the stencil.

    Declaration
    public int stencilWriteMask
    Field Value
    Type Description
    int

    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
    CustomPass.AggregateCullingParameters(ref ScriptableCullingParameters, HDCamera)

    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
    CustomPass.Execute(CustomPassContext)

    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
    CustomPass.RegisterMaterialForInspector()

    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

    Overrides
    CustomPass.Setup(ScriptableRenderContext, CommandBuffer)

    Implements

    IVersionable<TVersion>
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)