Quick answer: Override RecordRenderGraph, build the pass via rg.AddRasterRenderPass, declare inputs with builder.UseTexture and outputs with builder.SetRenderAttachment. Drop direct RTHandle reads.
Upgrade to URP 17. Your custom Renderer Feature throws “resource not set” the moment its pass runs. The new Render Graph requires explicit resource declarations; touching textures without registering them fails the graph build.
The Symptom
RenderGraphResourceRegistry exception or “Resource X is not set in pass Y.” Custom features built for URP 14 break on import.
The Fix
public class MyEffectFeature : ScriptableRendererFeature
{
class MyPass : ScriptableRenderPass
{
private class PassData { public TextureHandle Source; public Material Mat; }
public override void RecordRenderGraph(RenderGraph rg, ContextContainer ctx)
{
var resourceData = ctx.Get<UniversalResourceData>();
var camColor = resourceData.activeColorTexture;
var dst = rg.CreateTexture(new TextureDesc(camColor) { name = "_MyEffect_Tmp" });
using (var builder = rg.AddRasterRenderPass<PassData>("MyEffect", out var data))
{
builder.UseTexture(camColor, AccessFlags.Read);
builder.SetRenderAttachment(dst, 0, AccessFlags.Write);
data.Source = camColor;
data.Mat = _material;
builder.SetRenderFunc((PassData d, RasterGraphContext c) =>
{
Blitter.BlitTexture(c.cmd, d.Source, new Vector4(1,1,0,0), d.Mat, 0);
});
}
resourceData.cameraColor = dst;
}
}
}
UseTexture declares the input dependency. SetRenderAttachment declares the output. Render Graph plans accordingly.
Compatibility Mode
Project Settings → URP Asset → Compatibility Mode. Toggle to keep the legacy path running during migration. Disable once the new code is verified.
Verifying
No console errors on play. Frame Debugger shows your custom pass between the expected events. Output matches what you saw in URP 14.
“UseTexture and SetRenderAttachment per resource. Render Graph plans the work.”
Related Issues
For Renderer Feature blit, see blit pass event. For SRP Batcher, see SRP Batcher.
Declare resources. Graph plans. Pass runs.