docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method SetRenderTarget

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier, ClearFlag, Color, int, CubemapFace, int)

    Set the current render texture.

    Declaration
    public static void SetRenderTarget(CommandBuffer cmd, RenderTargetIdentifier buffer, ClearFlag clearFlag, Color clearColor, int miplevel = 0, CubemapFace cubemapFace = CubemapFace.Unknown, int depthSlice = -1)
    Parameters
    Type Name Description
    CommandBuffer cmd

    CommandBuffer used for rendering commands.

    RenderTargetIdentifier buffer

    RenderTargetIdentifier of the render texture.

    ClearFlag clearFlag

    If not set to ClearFlag.None, specifies how to clear the render target after setup.

    Color clearColor

    If applicable, color with which to clear the render texture after setup.

    int miplevel

    Mip level that should be bound as a render texture if applicable.

    CubemapFace cubemapFace

    Cubemap face that should be bound as a render texture if applicable.

    int depthSlice

    Depth slice that should be bound as a render texture if applicable.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier, ClearFlag, int, CubemapFace, int)

    Set the current render texture.

    Declaration
    public static void SetRenderTarget(CommandBuffer cmd, RenderTargetIdentifier buffer, ClearFlag clearFlag = ClearFlag.None, int miplevel = 0, CubemapFace cubemapFace = CubemapFace.Unknown, int depthSlice = -1)
    Parameters
    Type Name Description
    CommandBuffer cmd

    CommandBuffer used for rendering commands.

    RenderTargetIdentifier buffer

    RenderTargetIdentifier of the render texture.

    ClearFlag clearFlag

    If not set to ClearFlag.None, specifies how to clear the render target after setup.

    int miplevel

    Mip level that should be bound as a render texture if applicable.

    CubemapFace cubemapFace

    Cubemap face that should be bound as a render texture if applicable.

    int depthSlice

    Depth slice that should be bound as a render texture if applicable.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderTargetIdentifier, int, CubemapFace, int)

    Set the current render texture.

    Declaration
    public static void SetRenderTarget(CommandBuffer cmd, RenderTargetIdentifier colorBuffer, RenderTargetIdentifier depthBuffer, int miplevel = 0, CubemapFace cubemapFace = CubemapFace.Unknown, int depthSlice = -1)
    Parameters
    Type Name Description
    CommandBuffer cmd

    CommandBuffer used for rendering commands.

    RenderTargetIdentifier colorBuffer

    RenderTargetIdentifier of the color render texture.

    RenderTargetIdentifier depthBuffer

    RenderTargetIdentifier of the depth render texture.

    int miplevel

    Mip level that should be bound as a render texture if applicable.

    CubemapFace cubemapFace

    Cubemap face that should be bound as a render texture if applicable.

    int depthSlice

    Depth slice that should be bound as a render texture if applicable.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderTargetIdentifier, ClearFlag, int, CubemapFace, int)

    Set the current render texture.

    Declaration
    public static void SetRenderTarget(CommandBuffer cmd, RenderTargetIdentifier colorBuffer, RenderTargetIdentifier depthBuffer, ClearFlag clearFlag, int miplevel = 0, CubemapFace cubemapFace = CubemapFace.Unknown, int depthSlice = -1)
    Parameters
    Type Name Description
    CommandBuffer cmd

    CommandBuffer used for rendering commands.

    RenderTargetIdentifier colorBuffer

    RenderTargetIdentifier of the color render texture.

    RenderTargetIdentifier depthBuffer

    RenderTargetIdentifier of the depth render texture.

    ClearFlag clearFlag

    If not set to ClearFlag.None, specifies how to clear the render target after setup.

    int miplevel

    Mip level that should be bound as a render texture if applicable.

    CubemapFace cubemapFace

    Cubemap face that should be bound as a render texture if applicable.

    int depthSlice

    Depth slice that should be bound as a render texture if applicable.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderTargetIdentifier, ClearFlag, Color, int, CubemapFace, int)

    Set the current render texture.

    Declaration
    public static void SetRenderTarget(CommandBuffer cmd, RenderTargetIdentifier colorBuffer, RenderTargetIdentifier depthBuffer, ClearFlag clearFlag, Color clearColor, int miplevel = 0, CubemapFace cubemapFace = CubemapFace.Unknown, int depthSlice = -1)
    Parameters
    Type Name Description
    CommandBuffer cmd

    CommandBuffer used for rendering commands.

    RenderTargetIdentifier colorBuffer

    RenderTargetIdentifier of the color render texture.

    RenderTargetIdentifier depthBuffer

    RenderTargetIdentifier of the depth render texture.

    ClearFlag clearFlag

    If not set to ClearFlag.None, specifies how to clear the render target after setup.

    Color clearColor

    If applicable, color with which to clear the render texture after setup.

    int miplevel

    Mip level that should be bound as a render texture if applicable.

    CubemapFace cubemapFace

    Cubemap face that should be bound as a render texture if applicable.

    int depthSlice

    Depth slice that should be bound as a render texture if applicable.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier[], RenderTargetIdentifier)

    Set the current multiple render texture.

    Declaration
    public static void SetRenderTarget(CommandBuffer cmd, RenderTargetIdentifier[] colorBuffers, RenderTargetIdentifier depthBuffer)
    Parameters
    Type Name Description
    CommandBuffer cmd

    CommandBuffer used for rendering commands.

    RenderTargetIdentifier[] colorBuffers

    RenderTargetIdentifier array of the color render textures.

    RenderTargetIdentifier depthBuffer

    RenderTargetIdentifier of the depth render texture.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier[], RenderTargetIdentifier, ClearFlag)

    Set the current multiple render texture.

    Declaration
    public static void SetRenderTarget(CommandBuffer cmd, RenderTargetIdentifier[] colorBuffers, RenderTargetIdentifier depthBuffer, ClearFlag clearFlag = ClearFlag.None)
    Parameters
    Type Name Description
    CommandBuffer cmd

    CommandBuffer used for rendering commands.

    RenderTargetIdentifier[] colorBuffers

    RenderTargetIdentifier array of the color render textures.

    RenderTargetIdentifier depthBuffer

    RenderTargetIdentifier of the depth render texture.

    ClearFlag clearFlag

    If not set to ClearFlag.None, specifies how to clear the render target after setup.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier[], RenderTargetIdentifier, ClearFlag, Color)

    Set the current multiple render texture.

    Declaration
    public static void SetRenderTarget(CommandBuffer cmd, RenderTargetIdentifier[] colorBuffers, RenderTargetIdentifier depthBuffer, ClearFlag clearFlag, Color clearColor)
    Parameters
    Type Name Description
    CommandBuffer cmd

    CommandBuffer used for rendering commands.

    RenderTargetIdentifier[] colorBuffers

    RenderTargetIdentifier array of the color render textures.

    RenderTargetIdentifier depthBuffer

    RenderTargetIdentifier of the depth render texture.

    ClearFlag clearFlag

    If not set to ClearFlag.None, specifies how to clear the render target after setup.

    Color clearColor

    If applicable, color with which to clear the render texture after setup.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, ClearFlag, Color)

    Set the current render texture.

    Declaration
    public static void SetRenderTarget(CommandBuffer cmd, RenderTargetIdentifier buffer, RenderBufferLoadAction loadAction, RenderBufferStoreAction storeAction, ClearFlag clearFlag, Color clearColor)
    Parameters
    Type Name Description
    CommandBuffer cmd

    CommandBuffer used for rendering commands.

    RenderTargetIdentifier buffer

    Color buffer RenderTargetIdentifier.

    RenderBufferLoadAction loadAction

    Load action.

    RenderBufferStoreAction storeAction

    Store action.

    ClearFlag clearFlag

    If not set to ClearFlag.None, specifies how to clear the render target after setup.

    Color clearColor

    If applicable, color with which to clear the render texture after setup.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, int, CubemapFace, int)

    Set the current render texture.

    Declaration
    public static void SetRenderTarget(CommandBuffer cmd, RenderTargetIdentifier buffer, RenderBufferLoadAction loadAction, RenderBufferStoreAction storeAction, int miplevel = 0, CubemapFace cubemapFace = CubemapFace.Unknown, int depthSlice = -1)
    Parameters
    Type Name Description
    CommandBuffer cmd

    CommandBuffer used for rendering commands.

    RenderTargetIdentifier buffer

    Color buffer RenderTargetIdentifier.

    RenderBufferLoadAction loadAction

    Load action.

    RenderBufferStoreAction storeAction

    Store action.

    int miplevel

    Mip level that should be bound as a render texture if applicable.

    CubemapFace cubemapFace

    Cubemap face that should be bound as a render texture if applicable.

    int depthSlice

    Depth slice that should be bound as a render texture if applicable.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, ClearFlag, Color, int, CubemapFace, int)

    Set the current render texture.

    Declaration
    public static void SetRenderTarget(CommandBuffer cmd, RenderTargetIdentifier buffer, RenderBufferLoadAction loadAction, RenderBufferStoreAction storeAction, ClearFlag clearFlag, Color clearColor, int miplevel = 0, CubemapFace cubemapFace = CubemapFace.Unknown, int depthSlice = -1)
    Parameters
    Type Name Description
    CommandBuffer cmd

    CommandBuffer used for rendering commands.

    RenderTargetIdentifier buffer

    Color buffer RenderTargetIdentifier.

    RenderBufferLoadAction loadAction

    Load action.

    RenderBufferStoreAction storeAction

    Store action.

    ClearFlag clearFlag

    If not set to ClearFlag.None, specifies how to clear the render target after setup.

    Color clearColor

    If applicable, color with which to clear the render texture after setup.

    int miplevel

    Mip level that should be bound as a render texture if applicable.

    CubemapFace cubemapFace

    Cubemap face that should be bound as a render texture if applicable.

    int depthSlice

    Depth slice that should be bound as a render texture if applicable.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, ClearFlag)

    Set the current render texture.

    Declaration
    public static void SetRenderTarget(CommandBuffer cmd, RenderTargetIdentifier buffer, RenderBufferLoadAction loadAction, RenderBufferStoreAction storeAction, ClearFlag clearFlag)
    Parameters
    Type Name Description
    CommandBuffer cmd

    CommandBuffer used for rendering commands.

    RenderTargetIdentifier buffer

    Color buffer RenderTargetIdentifier.

    RenderBufferLoadAction loadAction

    Load action.

    RenderBufferStoreAction storeAction

    Store action.

    ClearFlag clearFlag

    If not set to ClearFlag.None, specifies how to clear the render target after setup.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, ClearFlag, Color)

    Set the current render texture.

    Declaration
    public static void SetRenderTarget(CommandBuffer cmd, RenderTargetIdentifier colorBuffer, RenderBufferLoadAction colorLoadAction, RenderBufferStoreAction colorStoreAction, RenderTargetIdentifier depthBuffer, RenderBufferLoadAction depthLoadAction, RenderBufferStoreAction depthStoreAction, ClearFlag clearFlag, Color clearColor)
    Parameters
    Type Name Description
    CommandBuffer cmd

    CommandBuffer used for rendering commands.

    RenderTargetIdentifier colorBuffer

    Color buffer RenderTargetIdentifier.

    RenderBufferLoadAction colorLoadAction

    Color buffer load action.

    RenderBufferStoreAction colorStoreAction

    Color buffer store action.

    RenderTargetIdentifier depthBuffer

    Depth buffer RenderTargetIdentifier.

    RenderBufferLoadAction depthLoadAction

    Depth buffer load action.

    RenderBufferStoreAction depthStoreAction

    Depth buffer store action.

    ClearFlag clearFlag

    If not set to ClearFlag.None, specifies how to clear the render target after setup.

    Color clearColor

    If applicable, color with which to clear the render texture after setup.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, int, CubemapFace, int)

    Set the current render texture.

    Declaration
    public static void SetRenderTarget(CommandBuffer cmd, RenderTargetIdentifier colorBuffer, RenderBufferLoadAction colorLoadAction, RenderBufferStoreAction colorStoreAction, RenderTargetIdentifier depthBuffer, RenderBufferLoadAction depthLoadAction, RenderBufferStoreAction depthStoreAction, int miplevel = 0, CubemapFace cubemapFace = CubemapFace.Unknown, int depthSlice = -1)
    Parameters
    Type Name Description
    CommandBuffer cmd

    CommandBuffer used for rendering commands.

    RenderTargetIdentifier colorBuffer

    Color buffer RenderTargetIdentifier.

    RenderBufferLoadAction colorLoadAction

    Color buffer load action.

    RenderBufferStoreAction colorStoreAction

    Color buffer store action.

    RenderTargetIdentifier depthBuffer

    Depth buffer RenderTargetIdentifier.

    RenderBufferLoadAction depthLoadAction

    Depth buffer load action.

    RenderBufferStoreAction depthStoreAction

    Depth buffer store action.

    int miplevel

    Mip level that should be bound as a render texture if applicable.

    CubemapFace cubemapFace

    Cubemap face that should be bound as a render texture if applicable.

    int depthSlice

    Depth slice that should be bound as a render texture if applicable.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, ClearFlag, Color, int, CubemapFace, int)

    Set the current render texture.

    Declaration
    public static void SetRenderTarget(CommandBuffer cmd, RenderTargetIdentifier colorBuffer, RenderBufferLoadAction colorLoadAction, RenderBufferStoreAction colorStoreAction, RenderTargetIdentifier depthBuffer, RenderBufferLoadAction depthLoadAction, RenderBufferStoreAction depthStoreAction, ClearFlag clearFlag, Color clearColor, int miplevel = 0, CubemapFace cubemapFace = CubemapFace.Unknown, int depthSlice = -1)
    Parameters
    Type Name Description
    CommandBuffer cmd

    CommandBuffer used for rendering commands.

    RenderTargetIdentifier colorBuffer

    Color buffer RenderTargetIdentifier.

    RenderBufferLoadAction colorLoadAction

    Color buffer load action.

    RenderBufferStoreAction colorStoreAction

    Color buffer store action.

    RenderTargetIdentifier depthBuffer

    Depth buffer RenderTargetIdentifier.

    RenderBufferLoadAction depthLoadAction

    Depth buffer load action.

    RenderBufferStoreAction depthStoreAction

    Depth buffer store action.

    ClearFlag clearFlag

    If not set to ClearFlag.None, specifies how to clear the render target after setup.

    Color clearColor

    If applicable, color with which to clear the render texture after setup.

    int miplevel

    Mip level that should be bound as a render texture if applicable.

    CubemapFace cubemapFace

    Cubemap face that should be bound as a render texture if applicable.

    int depthSlice

    Depth slice that should be bound as a render texture if applicable.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, RenderBufferLoadAction, RenderBufferStoreAction, ClearFlag, Color)

    Set the current render texture.

    Declaration
    public static void SetRenderTarget(CommandBuffer cmd, RenderTargetIdentifier buffer, RenderBufferLoadAction colorLoadAction, RenderBufferStoreAction colorStoreAction, RenderBufferLoadAction depthLoadAction, RenderBufferStoreAction depthStoreAction, ClearFlag clearFlag, Color clearColor)
    Parameters
    Type Name Description
    CommandBuffer cmd

    CommandBuffer used for rendering commands.

    RenderTargetIdentifier buffer

    RenderTargetIdentifier of the render texture.

    RenderBufferLoadAction colorLoadAction

    Color buffer load action.

    RenderBufferStoreAction colorStoreAction

    Color buffer store action.

    RenderBufferLoadAction depthLoadAction

    Depth buffer load action.

    RenderBufferStoreAction depthStoreAction

    Depth buffer store action.

    ClearFlag clearFlag

    If not set to ClearFlag.None, specifies how to clear the render target after setup.

    Color clearColor

    If applicable, color with which to clear the render texture after setup.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, ClearFlag)

    Set the current render texture.

    Declaration
    public static void SetRenderTarget(CommandBuffer cmd, RenderTargetIdentifier colorBuffer, RenderBufferLoadAction colorLoadAction, RenderBufferStoreAction colorStoreAction, RenderTargetIdentifier depthBuffer, RenderBufferLoadAction depthLoadAction, RenderBufferStoreAction depthStoreAction, ClearFlag clearFlag)
    Parameters
    Type Name Description
    CommandBuffer cmd

    CommandBuffer used for rendering commands.

    RenderTargetIdentifier colorBuffer

    Color buffer RenderTargetIdentifier.

    RenderBufferLoadAction colorLoadAction

    Color buffer load action.

    RenderBufferStoreAction colorStoreAction

    Color buffer store action.

    RenderTargetIdentifier depthBuffer

    Depth buffer RenderTargetIdentifier.

    RenderBufferLoadAction depthLoadAction

    Depth buffer load action.

    RenderBufferStoreAction depthStoreAction

    Depth buffer store action.

    ClearFlag clearFlag

    If not set to ClearFlag.None, specifies how to clear the render target after setup.

    SetRenderTarget(CommandBuffer, RTHandle, ClearFlag, Color, int, CubemapFace, int)

    Setup the current render texture using an RTHandle

    Declaration
    public static void SetRenderTarget(CommandBuffer cmd, RTHandle buffer, ClearFlag clearFlag, Color clearColor, int miplevel = 0, CubemapFace cubemapFace = CubemapFace.Unknown, int depthSlice = -1)
    Parameters
    Type Name Description
    CommandBuffer cmd

    CommandBuffer used for rendering commands

    RTHandle buffer

    Color buffer RTHandle

    ClearFlag clearFlag

    If not set to ClearFlag.None, specifies how to clear the render target after setup.

    Color clearColor

    If applicable, color with which to clear the render texture after setup.

    int miplevel

    Mip level that should be bound as a render texture if applicable.

    CubemapFace cubemapFace

    Cubemap face that should be bound as a render texture if applicable.

    int depthSlice

    Depth slice that should be bound as a render texture if applicable.

    SetRenderTarget(CommandBuffer, RTHandle, ClearFlag, int, CubemapFace, int)

    Setup the current render texture using an RTHandle

    Declaration
    public static void SetRenderTarget(CommandBuffer cmd, RTHandle buffer, ClearFlag clearFlag = ClearFlag.None, int miplevel = 0, CubemapFace cubemapFace = CubemapFace.Unknown, int depthSlice = -1)
    Parameters
    Type Name Description
    CommandBuffer cmd

    CommandBuffer used for rendering commands

    RTHandle buffer

    Color buffer RTHandle

    ClearFlag clearFlag

    If not set to ClearFlag.None, specifies how to clear the render target after setup.

    int miplevel

    Mip level that should be bound as a render texture if applicable.

    CubemapFace cubemapFace

    Cubemap face that should be bound as a render texture if applicable.

    int depthSlice

    Depth slice that should be bound as a render texture if applicable.

    SetRenderTarget(CommandBuffer, RTHandle, RTHandle, int, CubemapFace, int)

    Setup the current render texture using an RTHandle

    Declaration
    public static void SetRenderTarget(CommandBuffer cmd, RTHandle colorBuffer, RTHandle depthBuffer, int miplevel = 0, CubemapFace cubemapFace = CubemapFace.Unknown, int depthSlice = -1)
    Parameters
    Type Name Description
    CommandBuffer cmd

    CommandBuffer used for rendering commands

    RTHandle colorBuffer

    Color buffer RTHandle

    RTHandle depthBuffer

    Depth buffer RTHandle

    int miplevel

    Mip level that should be bound as a render texture if applicable.

    CubemapFace cubemapFace

    Cubemap face that should be bound as a render texture if applicable.

    int depthSlice

    Depth slice that should be bound as a render texture if applicable.

    SetRenderTarget(CommandBuffer, RTHandle, RTHandle, ClearFlag, int, CubemapFace, int)

    Setup the current render texture using an RTHandle

    Declaration
    public static void SetRenderTarget(CommandBuffer cmd, RTHandle colorBuffer, RTHandle depthBuffer, ClearFlag clearFlag, int miplevel = 0, CubemapFace cubemapFace = CubemapFace.Unknown, int depthSlice = -1)
    Parameters
    Type Name Description
    CommandBuffer cmd

    CommandBuffer used for rendering commands

    RTHandle colorBuffer

    Color buffer RTHandle

    RTHandle depthBuffer

    Depth buffer RTHandle

    ClearFlag clearFlag

    If not set to ClearFlag.None, specifies how to clear the render target after setup.

    int miplevel

    Mip level that should be bound as a render texture if applicable.

    CubemapFace cubemapFace

    Cubemap face that should be bound as a render texture if applicable.

    int depthSlice

    Depth slice that should be bound as a render texture if applicable.

    SetRenderTarget(CommandBuffer, RTHandle, RTHandle, ClearFlag, Color, int, CubemapFace, int)

    Setup the current render texture using an RTHandle

    Declaration
    public static void SetRenderTarget(CommandBuffer cmd, RTHandle colorBuffer, RTHandle depthBuffer, ClearFlag clearFlag, Color clearColor, int miplevel = 0, CubemapFace cubemapFace = CubemapFace.Unknown, int depthSlice = -1)
    Parameters
    Type Name Description
    CommandBuffer cmd

    CommandBuffer used for rendering commands

    RTHandle colorBuffer

    Color buffer RTHandle

    RTHandle depthBuffer

    Depth buffer RTHandle

    ClearFlag clearFlag

    If not set to ClearFlag.None, specifies how to clear the render target after setup.

    Color clearColor

    If applicable, color with which to clear the render texture after setup.

    int miplevel

    Mip level that should be bound as a render texture if applicable.

    CubemapFace cubemapFace

    Cubemap face that should be bound as a render texture if applicable.

    int depthSlice

    Depth slice that should be bound as a render texture if applicable.

    SetRenderTarget(CommandBuffer, RTHandle, RenderBufferLoadAction, RenderBufferStoreAction, ClearFlag, Color, int, CubemapFace, int)

    Set the current render texture.

    Declaration
    public static void SetRenderTarget(CommandBuffer cmd, RTHandle buffer, RenderBufferLoadAction loadAction, RenderBufferStoreAction storeAction, ClearFlag clearFlag, Color clearColor, int miplevel = 0, CubemapFace cubemapFace = CubemapFace.Unknown, int depthSlice = -1)
    Parameters
    Type Name Description
    CommandBuffer cmd

    CommandBuffer used for rendering commands.

    RTHandle buffer

    Color buffer RTHandleRTR.

    RenderBufferLoadAction loadAction

    Load action.

    RenderBufferStoreAction storeAction

    Store action.

    ClearFlag clearFlag

    If not set to ClearFlag.None, specifies how to clear the render target after setup.

    Color clearColor

    If applicable, color with which to clear the render texture after setup.

    int miplevel

    Mip level that should be bound as a render texture if applicable.

    CubemapFace cubemapFace

    Cubemap face that should be bound as a render texture if applicable.

    int depthSlice

    Depth slice that should be bound as a render texture if applicable.

    SetRenderTarget(CommandBuffer, RTHandle, RenderBufferLoadAction, RenderBufferStoreAction, RTHandle, RenderBufferLoadAction, RenderBufferStoreAction, ClearFlag, Color, int, CubemapFace, int)

    Set the current render texture.

    Declaration
    public static void SetRenderTarget(CommandBuffer cmd, RTHandle colorBuffer, RenderBufferLoadAction colorLoadAction, RenderBufferStoreAction colorStoreAction, RTHandle depthBuffer, RenderBufferLoadAction depthLoadAction, RenderBufferStoreAction depthStoreAction, ClearFlag clearFlag, Color clearColor, int miplevel = 0, CubemapFace cubemapFace = CubemapFace.Unknown, int depthSlice = -1)
    Parameters
    Type Name Description
    CommandBuffer cmd

    CommandBuffer used for rendering commands.

    RTHandle colorBuffer

    Color buffer RTHandle.

    RenderBufferLoadAction colorLoadAction

    Color buffer load action.

    RenderBufferStoreAction colorStoreAction

    Color buffer store action.

    RTHandle depthBuffer

    Depth buffer RTHandle.

    RenderBufferLoadAction depthLoadAction

    Depth buffer load action.

    RenderBufferStoreAction depthStoreAction

    Depth buffer store action.

    ClearFlag clearFlag

    If not set to ClearFlag.None, specifies how to clear the render target after setup.

    Color clearColor

    If applicable, color with which to clear the render texture after setup.

    int miplevel

    Mip level that should be bound as a render texture if applicable.

    CubemapFace cubemapFace

    Cubemap face that should be bound as a render texture if applicable.

    int depthSlice

    Depth slice that should be bound as a render texture if applicable.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier[], RTHandle)

    Set the current multiple render texture.

    Declaration
    public static void SetRenderTarget(CommandBuffer cmd, RenderTargetIdentifier[] colorBuffers, RTHandle depthBuffer)
    Parameters
    Type Name Description
    CommandBuffer cmd

    CommandBuffer used for rendering commands.

    RenderTargetIdentifier[] colorBuffers

    RenderTargetIdentifier array of the color render textures.

    RTHandle depthBuffer

    Depth Buffer RTHandle.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier[], RTHandle, ClearFlag)

    Set the current multiple render texture.

    Declaration
    public static void SetRenderTarget(CommandBuffer cmd, RenderTargetIdentifier[] colorBuffers, RTHandle depthBuffer, ClearFlag clearFlag = ClearFlag.None)
    Parameters
    Type Name Description
    CommandBuffer cmd

    CommandBuffer used for rendering commands.

    RenderTargetIdentifier[] colorBuffers

    RenderTargetIdentifier array of the color render textures.

    RTHandle depthBuffer

    Depth Buffer RTHandle.

    ClearFlag clearFlag

    If not set to ClearFlag.None, specifies how to clear the render target after setup.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier[], RTHandle, ClearFlag, Color)

    Set the current multiple render texture.

    Declaration
    public static void SetRenderTarget(CommandBuffer cmd, RenderTargetIdentifier[] colorBuffers, RTHandle depthBuffer, ClearFlag clearFlag, Color clearColor)
    Parameters
    Type Name Description
    CommandBuffer cmd

    CommandBuffer used for rendering commands.

    RenderTargetIdentifier[] colorBuffers

    RenderTargetIdentifier array of the color render textures.

    RTHandle depthBuffer

    Depth Buffer RTHandle.

    ClearFlag clearFlag

    If not set to ClearFlag.None, specifies how to clear the render target after setup.

    Color clearColor

    If applicable, color with which to clear the render texture after setup.

    In This Article
    • SetRenderTarget(CommandBuffer, RenderTargetIdentifier, ClearFlag, Color, int, CubemapFace, int)
    • SetRenderTarget(CommandBuffer, RenderTargetIdentifier, ClearFlag, int, CubemapFace, int)
    • SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderTargetIdentifier, int, CubemapFace, int)
    • SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderTargetIdentifier, ClearFlag, int, CubemapFace, int)
    • SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderTargetIdentifier, ClearFlag, Color, int, CubemapFace, int)
    • SetRenderTarget(CommandBuffer, RenderTargetIdentifier[], RenderTargetIdentifier)
    • SetRenderTarget(CommandBuffer, RenderTargetIdentifier[], RenderTargetIdentifier, ClearFlag)
    • SetRenderTarget(CommandBuffer, RenderTargetIdentifier[], RenderTargetIdentifier, ClearFlag, Color)
    • SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, ClearFlag, Color)
    • SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, int, CubemapFace, int)
    • SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, ClearFlag, Color, int, CubemapFace, int)
    • SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, ClearFlag)
    • SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, ClearFlag, Color)
    • SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, int, CubemapFace, int)
    • SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, ClearFlag, Color, int, CubemapFace, int)
    • SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, RenderBufferLoadAction, RenderBufferStoreAction, ClearFlag, Color)
    • SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, ClearFlag)
    • SetRenderTarget(CommandBuffer, RTHandle, ClearFlag, Color, int, CubemapFace, int)
    • SetRenderTarget(CommandBuffer, RTHandle, ClearFlag, int, CubemapFace, int)
    • SetRenderTarget(CommandBuffer, RTHandle, RTHandle, int, CubemapFace, int)
    • SetRenderTarget(CommandBuffer, RTHandle, RTHandle, ClearFlag, int, CubemapFace, int)
    • SetRenderTarget(CommandBuffer, RTHandle, RTHandle, ClearFlag, Color, int, CubemapFace, int)
    • SetRenderTarget(CommandBuffer, RTHandle, RenderBufferLoadAction, RenderBufferStoreAction, ClearFlag, Color, int, CubemapFace, int)
    • SetRenderTarget(CommandBuffer, RTHandle, RenderBufferLoadAction, RenderBufferStoreAction, RTHandle, RenderBufferLoadAction, RenderBufferStoreAction, ClearFlag, Color, int, CubemapFace, int)
    • SetRenderTarget(CommandBuffer, RenderTargetIdentifier[], RTHandle)
    • SetRenderTarget(CommandBuffer, RenderTargetIdentifier[], RTHandle, ClearFlag)
    • SetRenderTarget(CommandBuffer, RenderTargetIdentifier[], RTHandle, ClearFlag, Color)
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)