docs.unity3d.com
    Show / Hide Table of Contents

    Class DrawRenderersCustomPass

    DrawRenderers Custom Pass

    Inheritance
    Object
    CustomPass
    DrawRenderersCustomPass
    ObjectIDCustomPass
    Inherited Members
    CustomPass.name
    CustomPass.enabled
    CustomPass.targetColorBuffer
    CustomPass.targetDepthBuffer
    CustomPass.clearFlags
    CustomPass.fadeValue
    CustomPass.injectionPoint
    CustomPass.executeInSceneView
    CustomPass.IVersionable<CustomPass.Version>.version
    CustomPass.Execute(ScriptableRenderContext, CommandBuffer, HDCamera, CullingResults)
    CustomPass.Cleanup()
    CustomPass.SetCameraRenderTarget(CommandBuffer, Boolean, ClearFlag)
    CustomPass.SetCustomRenderTarget(CommandBuffer, Boolean, ClearFlag)
    CustomPass.SetRenderTargetAuto(CommandBuffer)
    CustomPass.ResolveMSAAColorBuffer(CommandBuffer, HDCamera)
    CustomPass.ResolveMSAAColorBuffer(CustomPassContext)
    CustomPass.GetCameraBuffers(RTHandle, RTHandle)
    CustomPass.GetCustomBuffers(RTHandle, 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)
    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
    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)
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023