Extending URP with Additional Subpasses

I’d like to extend URP with an additional renderpass/subpass but I’m wondering where I can create the renderpass + subpass such that it’s scheduled after the main URP pass.

I understand that there are renderer features which I can add onto URP, but the issue I’m having especially with renderer features is that my custom screen space UI gets affected by Post Postprocessing in URP (this is testing with the BoatAttack demo which does a final blit to apply post processing which pretty much removes the point of AfterPostProcessing rendering event).

I might be missing something obvious to make sure that my UI is not affected by post processing but I’m not sure and figure maybe drawing it as a separate renderpass + subpass might be a decent solution. For reference here are some screenshots where my UI is washed out in the BoatAttack demo and what the actual color should look like.

As you mentioned, you can use the ScriptableRenderPass and ScriptableRendererFeature API to implement your pass and subpasses/attachments.
You can then add the renderer feature to the renderer used by your camera.
https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@10.1/manual/urp-renderer-feature.html

You could specify the event in which to inject your pass.
https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@7.0/api/UnityEngine.Rendering.Universal.RenderPassEvent.html

7874398--1001107--upload_2022-2-7_9-13-36.png

The second screenshot I posted doesn’t do justice since it doesn’t show my renderer feature settings, but even if you inject the renderer feature to run After Post Processing/After Rendering, it will still be affected by Render Final Post Processing Pass. This is an updated screenshot with my intentions.

I have some experience with Vulkan so the concept of RenderPass + Subpass isn’t too unfamiliar, but I’m still not sure where I’d inject a new RenderPass + Subpass aside from a RenderPipelineAsset.

7875304--1001269--renderer-feature+post-processing.jpg

I guess this isn’t possible?