docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class RenderGraph

    This class is the main entry point of the Render Graph system.

    Inheritance
    object
    RenderGraph
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Experimental.Rendering.RenderGraphModule
    Assembly: Unity.RenderPipelines.Core.Runtime.dll
    Syntax
    public class RenderGraph

    Constructors

    Name Description
    RenderGraph(string)

    Render Graph constructor.

    Fields

    Name Description
    kMaxMRTCount

    Maximum number of MRTs supported by Render Graph.

    Properties

    Name Description
    defaultResources

    Set of default resources usable in a pass rendering code.

    name

    Name of the Render Graph.

    Methods

    Name Description
    AddComputePass<PassData>(string, out PassData, string, int)

    Add a new Compute Render Pass to the Render Graph. Raster passes can execute rasterization workloads but cannot do other GPU work like copies or compute.

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

    Add a new Compute Render Pass to the Render Graph. Compute passes can execute compute workloads but cannot do rasterization.

    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.
    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.
    AddMovePass(TextureHandle, TextureHandle, string, int)

    Add a new move pass to the Render Graph. This pass moves data from one texture to another. Note that this pass is more limited in functionality than for example doing a blit from one texture to another. It cannot do any type conversions, the textures have to be the same size,... This pass may be optimized away by the RenderGraph depending on the dependencies within the graph. E.g. if the destination resource is the only resource ever using the data in source the graph may decide to directly render to the destination instead of rendering to source and then doing an copy to destination.

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

    Add a new Raster Render Pass to the Render Graph. Raster passes can execute rasterization workloads but cannot do other GPU work like copies or compute.

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

    Add a new Raster Render Pass to the Render Graph. Raster passes can execute rasterization workloads but cannot do other GPU work like copies or compute.

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

    Add a new Render Pass to the Render Graph.

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

    Add a new Render Pass to the Render Graph.

    AddResolvePass(TextureHandle, TextureHandle, string, int)

    Add a new Render Pass to the Render Graph that resolves the source texture into the destination texture. Note this is a special pass that depending on the GPU configuration might be "semi-free" and not execute any additional GPU commands. It is highly recommended to use resolve passes instead of making small passes that for example do commandBuffer.ResolveAntiAliasedSurface If the source and destination texture are both non MSAA this is equivalent to a move (see AddMovePass).

    BeginProfilingSampler(ProfilingSampler, string, int)

    Begin a profiling scope.

    Cleanup()

    Cleanup the Render Graph.

    CreateBuffer(in BufferDesc)

    Create a new Render Graph Graphics Buffer resource.

    CreateBuffer(in BufferHandle)

    Create a new Render Graph Graphics Buffer resource using the descriptor from another graphics buffer.

    CreateGizmoRendererList(in Camera, in GizmoSubset)

    Creates a new Gizmo Renderer List Render Graph resource.

    CreateRendererList(in RendererListParams)

    Creates a new Renderer List Render Graph resource.

    CreateRendererList(in RendererListDesc)

    Creates a new Renderer List Render Graph resource.

    CreateShadowRendererList(ref ShadowDrawingSettings)

    Creates a new Shadow Renderer List Render Graph resource.

    CreateSharedTexture(in TextureDesc, bool)

    Create a new Render Graph Shared Texture resource. This texture will be persistent across render graph executions.

    CreateTexture(in TextureDesc)

    Create a new Render Graph Texture resource.

    CreateTexture(TextureHandle)

    Create a new Render Graph Texture resource using the descriptor from another texture.

    CreateTextureIfInvalid(in TextureDesc, ref TextureHandle)

    Create a new Render Graph Texture if the passed handle is invalid and use said handle as output. If the passed handle is valid, no texture is created.

    CreateUIOverlayRendererList(in Camera)

    Creates a new UIOverlay Renderer List Render Graph resource.

    CreateWireOverlayRendererList(in Camera)

    Creates a new WireOverlay Renderer List Render Graph resource.

    EndFrame()

    End frame processing. Purge resources that have been used since last frame and resets internal states. This need to be called once per frame.

    EndProfilingSampler(ProfilingSampler, string, int)

    End a profiling scope.

    GetBufferDesc(in BufferHandle)

    Gets the descriptor of the specified Graphics Buffer resource.

    GetRegisteredRenderGraphs()

    Get the list of all registered render graphs.

    GetTextureDesc(TextureHandle)

    Gets the descriptor of the specified Texture resource.

    ImportBackbuffer(RenderTargetIdentifier)

    Import the final backbuffer to render graph.

    ImportBuffer(GraphicsBuffer, bool)

    Import an external Graphics Buffer to the Render Graph Any pass writing to an imported graphics buffer will be considered having side effects and can't be automatically culled.

    ImportTexture(RTHandle)

    Import an external texture to the Render Graph. Any pass writing to an imported texture will be considered having side effects and can't be automatically culled.

    RecordAndExecute(in RenderGraphParameters)

    Starts the recording of the the render graph and then automatically execute when the return value goes out of scope. This must be called before adding any pass to the render graph.

    RefreshSharedTextureDesc(TextureHandle, in TextureDesc)

    Refresh a shared texture with a new descriptor.

    RegisterDebug(Panel)

    Register the render graph to the debug window.

    ReleaseSharedTexture(TextureHandle)

    Release a Render Graph shared texture resource.

    UnRegisterDebug()

    Unregister render graph from the debug window.

    Extension Methods

    AnalyticsUtils.ToNestedColumnWithDefault<T>(T, T, bool)
    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)