A renderer feature list beside the pass callbacks that changed
A renderer feature list beside the pass callbacks that changed

First checks: what disappeared

The old custom pass allocated a temporary target in Configure and drew in Execute. Render graph does not keep that shape. A pass declares the resources it intends to touch and the graph hands over the real target, so code that implicitly assumed the camera target is the first to break.

Do not port everything at once

  1. Pick one broken pass. It is usually a blur or outline that reads the screen again.
  2. Write down what it reads and what it writes. That list becomes the declaration.
  3. Leave the other passes on the compatibility path and move only this one.
  4. Open the Render Graph Viewer and confirm the declared dependencies match reality.
class OutlinePass : ScriptableRenderPass
{
    class PassData
    {
        public TextureHandle source;
        public TextureHandle destination;
        public Material material;
    }

    public override void RecordRenderGraph(RenderGraph graph, ContextContainer frame)
    {
        var resources = frame.Get<UniversalResourceData>();
        using var builder = graph.AddRasterRenderPass<PassData>("Outline", out var data);
        data.source = resources.activeColorTexture;
        builder.UseTexture(data.source);
        builder.SetRenderFunc((PassData pass, RasterGraphContext context) =>
            Blitter.BlitTexture(context.cmd, pass.source, new Vector4(1, 1, 0, 0), pass.material, 0));
    }
}

Touching an undeclared target fails quietly

If a pass touches a target it never declared, the graph may reorder it or cull it as unnecessary. That is where a black screen or an effect arriving a frame late comes from. Read the declaration list before you edit the shader.

[Error] pass wrote to a texture it did not declare
[Info]  Render Graph Viewer: Outline has no consumer, culled

Expected result and next step

When the ported pass appears in the same slot with the same result in the Frame Debugger, that pass is done. Commit this one before starting the next. Several ported passes in one commit make it impossible to trace which declaration was wrong.

Verification scope

Official documentation review

Verified

Reviewed the article's code and procedure against official Unity documentation and marked it ready for publication. This is not a claim of an independent Unity project or device reproduction; version- or device-specific reports will be checked in that environment as follow-up.

Official documentation checkedURP render graph ↗