Version: Unity 6.3 Beta (6000.3)
Language : English
Create input data for a compute shader in URP
Optimize a render graph

Analyze a render graph in URP

To analyze a render graph, use the Render Graph Viewer window.

The Render Graph Viewer window displays a render graph, which is the optimized sequence of render passes the Universal Render PipelineA series of operations that take the contents of a Scene, and displays them on a screen. Unity lets you choose from pre-built render pipelines, or write your own. More info
See in Glossary
(URP) steps through each frame. The Render Graph Viewer displays both built-in render passes and any custom render passes you create.

For more information about the Render Graph Viewer window, refer to Render Graph Viewer window reference.

You can also use the following windows to analyze a render graph:

Open the Render Graph Viewer window

Go to Window > Analysis > Render Graph Viewer.

The Render Graph Viewer window displays the render graph for the active cameraA component which creates an image of a particular viewpoint in your scene. The output is either drawn to the screen or captured as a texture. More info
See in Glossary
by default. To select another camera, use the dropdown in the toolbarA row of buttons and basic controls at the top of the Unity Editor that allows you to interact with the Editor in various ways (e.g. scaling, translation). More info
See in Glossary
.

View the render graph for a built project

To connect the Render Graph Viewer window to a built project, follow these steps:

  1. When you build your project, enable Development BuildA development build includes debug symbols and enables the Profiler. More info
    See in Glossary
    in the Build ProfilesA set of customizable configuration settings to use when creating a build for your target platform. More info
    See in Glossary
    window.

    If you build for WebGLA JavaScript API that renders 2D and 3D graphics in a web browser. The Unity Web build option allows Unity to publish content as JavaScript programs which use HTML5 technologies and the WebGL rendering API to run Unity content in a web browser. More info
    See in Glossary
    or Universal Windows Platform (UWP), enable both Development Build and Autoconnect ProfilerA window that helps you to optimize your game. It shows how much time is spent in the various areas of your game. For example, it can report the percentage of time spent rendering, animating, or in your game logic. More info
    See in Glossary
    .

  2. Run your built project.

  3. In the Render Graph Viewer window, select the Target Selection dropdown. The dropdown is set to Editor by default.

  4. In the Local section, select your build.

Your build appears in the Local section only if the build is running.

Example: Check how URP uses a resource

You can use the resource access blocks next to a resource name to check how the render passes use the resource.

Render Graph Viewer example
Render Graph Viewer example

In the previous example, the _MainLightShadowmapTexture_ texture goes through the following stages:

  1. During the first five render passes between InitFrame and SetupCameraProperties, the texture doesn’t exist.

  2. The Main Light Shadowmap render pass creates the texture as a global texture, and has write-only access to it. For more information about global textures, refer to Transfer textures between passes.

    The blue merge bar below Main Light Shadowmap means URP merged Main Light Shadowmap, Additional Lights Shadowmap and SetupCameraProperties into a single render pass.

  3. The next five render passes don’t have access to the texture.

  4. The first Draw Objects render pass has read-only access to the texture.

  5. The next two render passes don’t have access to the texture.

  6. The second Draw Objects render pass has read-only access to the texture.

  7. Unity destroys the texture, because it’s no longer needed.

Check how URP optimized a render pass

To check the details of a render pass, for example to find out why it’s not a native render pass or a merged pass, do either of the following:

  • Select the render pass name to display the details in the Pass List.
  • Below the render pass name, hover your cursor over the gray, blue, or flashing blue resource access overview block.

For more information about displaying details of a render pass, refer to Render Graph Viewer window reference.

Additional resources

Create input data for a compute shader in URP
Optimize a render graph