The render graph system is a set of APIs from the Core Scriptable Render Pipeline (SRP) package. You use the APIs to write a Scriptable Render Pass in the Universal Render Pipeline (URP).
When you use the render graph API to create a Scriptable Render Pass, you tell URP the following:
You can then inject your Scriptable Render Pass into the URP renderer. Your Scriptable Render Pass becomes part of URP’s internal render graph, which is the sequence of render passes URP steps through each frame.
The render graph system automatically optimizes the graph to minimize the number of render passes, and the memory and bandwidth the render passes use.
The render graph system does the following to optimize rendering:
On mobile platforms that use tile-based deferred rendering (TBDR), the render graph system can also merge multiple render passes into a single native render pass. A native render pass keeps textures in tile memory, rather than copying textures from the GPU to the CPU. As a result, URP uses less memory bandwidth and rendering time.
To check how the render graph system optimizes rendering in your custom render passes, refer to Analyze a render graph.
To declare a resource and use it in a render pass, for example a texture or a list of objects to render, call render graph system APIs that return a handle to the resource. You can’t directly allocate or dispose of resources yourself.
The render graph system only allocates the memory for a resource just before the first render pass that writes to it, and releases the memory after the last render pass that reads it. This lets render graph manage memory in the most efficient way possible, and avoid allocating memory for resources that aren’t used in a frame.
You can create resources in two ways: