(URP RenderGraph) Custom Render Pass not being used in final blit

Hi, I’m in the process of updating a project to use RenderGraph in URP but I’m struggling with a custom post-process render pass. I’ve followed the example here to convert from using the deprecated Execute etc. methods to the RenderGraph API, and I can see that my volume component, Render Feature and Shader are all working correctly.

The one issue is with the RenderPass itself - the result just doesn’t appear in the final image. I can see from the Frame Debugger that the pass is executing and producing the right output, but it’s then followed by “(RP 4:0) BlitFinalToBackBuffer” which seems to just ignore my pass entirely.


I can see the RenderTarget is different between my pass and the UberPost pass (and the final blit, though that’s probably to be expected), but I’m using resourceData.activeColorTexture exactly as the example does, the only difference is I’m not using a second RT as I only have the one pass in my shader, so I’m using the same TextureHandle as both source and destination.

My full RenderPass code is below, I’d be super grateful if anyone knows what I’ve missed here!

ScreenTransitionPass.cs
using System;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.RenderGraphModule;
using UnityEngine.Rendering.RenderGraphModule.Util;
using UnityEngine.Rendering.Universal;

[Serializable]
public class ScreenTransitionPass : ScriptableRenderPass
{
	private const string TextureName = "_ScreenTransitionTexture";
	private const string PassName = "ColorBlitPass";

	private Material _material;
	private RenderTextureDescriptor _descriptor;

	private static readonly int Amount = Shader.PropertyToID("_Amount");
	private static readonly int Mask = Shader.PropertyToID("_Mask");
	private static readonly int TransitionBackground = Shader.PropertyToID("_Transition_Background");

	public ScreenTransitionPass(Material material)
	{
		_material = material;
		_descriptor = new RenderTextureDescriptor(Screen.width, Screen.height, RenderTextureFormat.Default, 0);
	}

	private void UpdateSettings(ScreenTransition effect)
	{
		if (_material == null)
			return;

		_material.SetFloat(ScreenTransitionPass.Amount, effect.amount.value);
		_material.SetTexture(ScreenTransitionPass.Mask, effect.transitionMask.value);
		_material.SetColor(ScreenTransitionPass.TransitionBackground, effect.backgroundColor.value);
	}

	public override void RecordRenderGraph(RenderGraph renderGraph, ContextContainer frameData)
	{
		var resourceData = frameData.Get<UniversalResourceData>();
		var cameraData = frameData.Get<UniversalCameraData>();

		// The following line ensures that the render pass doesn't blit from the back buffer.
		if (resourceData.isActiveTargetBackBuffer)
			return;

		// Set the texture size to be the same as the camera target size.
		_descriptor.width = cameraData.cameraTargetDescriptor.width;
		_descriptor.height = cameraData.cameraTargetDescriptor.height;
		_descriptor.depthBufferBits = 0;

		var source = resourceData.activeColorTexture;
		var stack = VolumeManager.instance.stack;
		var customEffect = stack.GetComponent<ScreenTransition>();

		UpdateSettings(customEffect);

		if (!source.IsValid())
			return;

		RenderGraphUtils.BlitMaterialParameters blitMaterialParameters = new(source, source, _material, 0);
		renderGraph.AddBlitPass(blitMaterialParameters, "Screen Transition Pass");
	}
}

The code looks ok, that might be a bug. Could you file a bugreport?

Thanks for the response, unfortunately the bug reporter isn’t working for me either - is there a bug reporter bug reporter I can use to report a bug with the bug reporter? :wink: I’ll try again in a bit, if not can I do it manually somewhere else? I’m happy to upload the relevant files here if needs be