docs.unity3d.com
    Show / Hide Table of Contents

    Class CopyDepthPass

    Copy the given depth buffer into the given destination depth buffer.

    You can use this pass to copy a depth buffer to a destination, so you can use it later in rendering. If the source texture has MSAA enabled, the pass uses a custom MSAA resolve. If the source texture does not have MSAA enabled, the pass uses a Blit or a Copy Texture operation, depending on what the current platform supports.

    Inheritance
    Object
    ScriptableRenderPass
    CopyDepthPass
    Inherited Members
    ScriptableRenderPass.FrameCleanup(CommandBuffer)
    ScriptableRenderPass.renderPassEvent
    ScriptableRenderPass.colorAttachments
    ScriptableRenderPass.colorAttachment
    ScriptableRenderPass.depthAttachment
    ScriptableRenderPass.input
    ScriptableRenderPass.clearFlag
    ScriptableRenderPass.clearColor
    ScriptableRenderPass.profilingSampler
    ScriptableRenderPass.ConfigureInput(ScriptableRenderPassInput)
    ScriptableRenderPass.ConfigureTarget(RenderTargetIdentifier, RenderTargetIdentifier)
    ScriptableRenderPass.ConfigureTarget(RenderTargetIdentifier[], RenderTargetIdentifier)
    ScriptableRenderPass.ConfigureTarget(RenderTargetIdentifier)
    ScriptableRenderPass.ConfigureTarget(RenderTargetIdentifier[])
    ScriptableRenderPass.ConfigureClear(ClearFlag, Color)
    ScriptableRenderPass.Configure(CommandBuffer, RenderTextureDescriptor)
    ScriptableRenderPass.OnFinishCameraStackRendering(CommandBuffer)
    ScriptableRenderPass.Blit(CommandBuffer, RenderTargetIdentifier, RenderTargetIdentifier, Material, Int32)
    ScriptableRenderPass.CreateDrawingSettings(ShaderTagId, RenderingData, SortingCriteria)
    ScriptableRenderPass.CreateDrawingSettings(List<ShaderTagId>, RenderingData, SortingCriteria)
    Namespace: UnityEngine.Rendering.Universal.Internal
    Syntax
    public class CopyDepthPass : ScriptableRenderPass

    Constructors

    CopyDepthPass(RenderPassEvent, Material)

    Declaration
    public CopyDepthPass(RenderPassEvent evt, Material copyDepthMaterial)
    Parameters
    Type Name Description
    RenderPassEvent evt
    Material copyDepthMaterial

    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
    ScriptableRenderPass.Execute(ScriptableRenderContext, ref RenderingData)

    OnCameraCleanup(CommandBuffer)

    Called upon finish rendering a camera. You can use this callback to release any resources created by this render pass that need to be cleanup once camera has finished rendering. This method be called for all cameras in a camera stack.

    Declaration
    public override void OnCameraCleanup(CommandBuffer cmd)
    Parameters
    Type Name Description
    CommandBuffer cmd

    Use this CommandBuffer to cleanup any generated data

    Overrides
    ScriptableRenderPass.OnCameraCleanup(CommandBuffer)

    OnCameraSetup(CommandBuffer, ref RenderingData)

    Declaration
    public override void OnCameraSetup(CommandBuffer cmd, ref RenderingData renderingData)
    Parameters
    Type Name Description
    CommandBuffer cmd
    RenderingData renderingData
    Overrides
    ScriptableRenderPass.OnCameraSetup(CommandBuffer, ref RenderingData)

    Setup(RenderTargetHandle, RenderTargetHandle)

    Configure the pass with the source and destination to execute on.

    Declaration
    public void Setup(RenderTargetHandle source, RenderTargetHandle destination)
    Parameters
    Type Name Description
    RenderTargetHandle source

    Source Render Target

    RenderTargetHandle destination

    Destination Render Targt

    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