docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class CopyColorPass

    Copy the given color buffer to the given destination color buffer.

    You can use this pass to copy a color buffer to the destination, so you can use it later in rendering. For example, you can copy the opaque texture to use it for distortion effects.

    Inheritance
    object
    ScriptableRenderPass
    CopyColorPass
    Inherited Members
    ScriptableRenderPass.renderPassEvent
    ScriptableRenderPass.colorAttachments
    ScriptableRenderPass.colorAttachment
    ScriptableRenderPass.depthAttachment
    ScriptableRenderPass.colorStoreActions
    ScriptableRenderPass.depthStoreAction
    ScriptableRenderPass.input
    ScriptableRenderPass.clearFlag
    ScriptableRenderPass.clearColor
    ScriptableRenderPass.profilingSampler
    ScriptableRenderPass.ConfigureInput(ScriptableRenderPassInput)
    ScriptableRenderPass.ConfigureColorStoreAction(RenderBufferStoreAction, uint)
    ScriptableRenderPass.ConfigureColorStoreActions(RenderBufferStoreAction[])
    ScriptableRenderPass.ConfigureDepthStoreAction(RenderBufferStoreAction)
    ScriptableRenderPass.ResetTarget()
    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, int)
    ScriptableRenderPass.Blit(CommandBuffer, ref RenderingData, Material, int)
    ScriptableRenderPass.CreateDrawingSettings(ShaderTagId, ref RenderingData, SortingCriteria)
    ScriptableRenderPass.CreateDrawingSettings(List<ShaderTagId>, ref RenderingData, SortingCriteria)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Rendering.Universal.Internal
    Assembly: Unity.RenderPipelines.Universal.Runtime.dll
    Syntax
    public class CopyColorPass : ScriptableRenderPass

    Constructors

    CopyColorPass(RenderPassEvent, Material, Material)

    Create the CopyColorPass

    Declaration
    public CopyColorPass(RenderPassEvent evt, Material samplingMaterial, Material copyColorMaterial = null)
    Parameters
    Type Name Description
    RenderPassEvent evt
    Material samplingMaterial
    Material copyColorMaterial

    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 should 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)

    This method is called by the renderer before rendering a camera Override this method if you need to to configure render targets and their clear state, and to create temporary render target textures. If a render pass doesn't override this method, this render pass renders to the active Camera's render target. You should never call CommandBuffer.SetRenderTarget. Instead call ConfigureTarget and ConfigureClear.

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

    CommandBuffer to enqueue rendering commands. This will be executed by the pipeline.

    RenderingData renderingData

    Current rendering state information

    Overrides
    ScriptableRenderPass.OnCameraSetup(CommandBuffer, ref RenderingData)
    See Also
    ConfigureTarget(RenderTargetIdentifier, RenderTargetIdentifier)
    ConfigureClear(ClearFlag, Color)

    Setup(RenderTargetIdentifier, RenderTargetHandle, Downsampling)

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

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

    Source Render Target

    RenderTargetHandle destination

    Destination Render Target

    Downsampling downsampling
    In This Article
    Back to top
    Copyright © 2025 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)