docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method AddLowLevelPass

    AddLowLevelPass<PassData>(string, out PassData, string, int)

    Add a new Low Level Render Pass to the Render Graph. Low level passes can do certain operations compute/raster render passes cannot do and have access to the full command buffer API. The low level API should be used sparingly as it has the following downsides

    • All native render passes will be serialized out.
    • In the future the render graph compiler may generate a sub-optimal command stream for low level passes. When using a low level pass the graph will also not automatically set-up graphics state like rendertargets. The pass should do this itself using cmd.SetRenderTarget and related commands.
    Declaration
    public ILowLevelRenderGraphBuilder AddLowLevelPass<PassData>(string passName, out PassData passData, string file = "", int line = 0) where PassData : class, new()
    Parameters
    Type Name Description
    string passName

    Name of the new Render Pass (this is also be used to generate a GPU profiling marker).

    PassData passData

    Instance of PassData that is passed to the render function and you must fill.

    string file

    File name of the source file this function is called from. Used for debugging. This parameter is automatically generated by the compiler. Users do not need to pass it.

    int line

    File line of the source file this function is called from. Used for debugging. This parameter is automatically generated by the compiler. Users do not need to pass it.

    Returns
    Type Description
    ILowLevelRenderGraphBuilder

    A new instance of a ILowLevelRenderGraphBuilder used to setup the new Low Level Render Pass.

    Type Parameters
    Name Description
    PassData

    Type of the class to use to provide data to the Render Pass.

    AddLowLevelPass<PassData>(string, out PassData, ProfilingSampler, string, int)

    Add a new Low Level Render Pass to the Render Graph. Low level passes can do certain operations compute/raster render passes cannot do and have access to the full command buffer API. The low level API should be used sparingly as it has the following downsides

    • All native render passes will be serialized out.
    • In the future the render graph compiler may generate a sub-optimal command stream for low level passes. When using a low level pass the graph will also not automatically set-up graphics state like rendertargets. The pass should do this itself using cmd.SetRenderTarget and related commands.
    Declaration
    public ILowLevelRenderGraphBuilder AddLowLevelPass<PassData>(string passName, out PassData passData, ProfilingSampler sampler, string file = "", int line = 0) where PassData : class, new()
    Parameters
    Type Name Description
    string passName

    Name of the new Render Pass (this is also be used to generate a GPU profiling marker).

    PassData passData

    Instance of PassData that is passed to the render function and you must fill.

    ProfilingSampler sampler

    Profiling sampler used around the pass.

    string file

    File name of the source file this function is called from. Used for debugging. This parameter is automatically generated by the compiler. Users do not need to pass it.

    int line

    File line of the source file this function is called from. Used for debugging. This parameter is automatically generated by the compiler. Users do not need to pass it.

    Returns
    Type Description
    ILowLevelRenderGraphBuilder

    A new instance of a ILowLevelRenderGraphBuilder used to setup the new Low Level Render Pass.

    Type Parameters
    Name Description
    PassData

    Type of the class to use to provide data to the Render Pass.

    In This Article
    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)