docs.unity3d.com
    Show / Hide Table of Contents

    Struct RenderGraphBuilder

    Use this struct to set up a new Render Pass.

    Namespace: UnityEngine.Experimental.Rendering.RenderGraphModule
    Syntax
    public struct RenderGraphBuilder : IDisposable

    Methods

    Dispose()

    Dispose the RenderGraphBuilder instance.

    Declaration
    public void Dispose()

    EnableAsyncCompute(Boolean)

    Enable asynchronous compute for this pass.

    Declaration
    public void EnableAsyncCompute(bool value)
    Parameters
    Type Name Description
    Boolean value

    Set to true to enable asynchronous compute.

    ReadTexture(RenderGraphResource)

    Specify a Texture resource to read from during the pass.

    Declaration
    public RenderGraphResource ReadTexture(in RenderGraphResource input)
    Parameters
    Type Name Description
    RenderGraphResource input

    The Texture resource to read from during the pass.

    Returns
    Type Description
    RenderGraphResource

    An updated resource handle to the input resource.

    SetRenderFunc<PassData>(RenderFunc<PassData>)

    Specify the render function to use for this pass. A call to this is mandatory for the pass to be valid.

    Declaration
    public void SetRenderFunc<PassData>(RenderFunc<PassData> renderFunc)
        where PassData : class, new()
    Parameters
    Type Name Description
    RenderFunc<PassData> renderFunc

    Render function for the pass.

    Type Parameters
    Name Description
    PassData

    The Type of the class that provides data to the Render Pass.

    UseColorBuffer(RenderGraphMutableResource, Int32)

    Specify that the pass will use a Texture resource as a color render target. This has the same effect as WriteTexture and also automatically sets the Texture to use as a render target.

    Declaration
    public RenderGraphMutableResource UseColorBuffer(in RenderGraphMutableResource input, int index)
    Parameters
    Type Name Description
    RenderGraphMutableResource input

    The Texture resource to use as a color render target.

    Int32 index

    Index for multiple render target usage.

    Returns
    Type Description
    RenderGraphMutableResource

    An updated resource handle to the input resource.

    UseDepthBuffer(RenderGraphMutableResource, DepthAccess)

    Specify that the pass will use a Texture resource as a depth buffer.

    Declaration
    public RenderGraphMutableResource UseDepthBuffer(in RenderGraphMutableResource input, DepthAccess flags)
    Parameters
    Type Name Description
    RenderGraphMutableResource input

    The Texture resource to use as a depth buffer during the pass.

    DepthAccess flags

    Specify the access level for the depth buffer. This allows you to say whether you will read from or write to the depth buffer, or do both.

    Returns
    Type Description
    RenderGraphMutableResource

    An updated resource handle to the input resource.

    UseRendererList(RenderGraphResource)

    Specify a Renderer List resource to use during the pass.

    Declaration
    public RenderGraphResource UseRendererList(in RenderGraphResource input)
    Parameters
    Type Name Description
    RenderGraphResource input

    The Renderer List resource to use during the pass.

    Returns
    Type Description
    RenderGraphResource

    An updated resource handle to the input resource.

    WriteTexture(RenderGraphMutableResource)

    Specify a Texture resource to write to during the pass.

    Declaration
    public RenderGraphMutableResource WriteTexture(in RenderGraphMutableResource input)
    Parameters
    Type Name Description
    RenderGraphMutableResource input

    The Texture resource to write to during the pass.

    Returns
    Type Description
    RenderGraphMutableResource

    An updated resource handle to the input resource.

    Back to top
    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