URP ShaderGraph with multiple RenderTargets?

Is it possible to have a custom shader output to mulitple render targets/textures like you can in the build in renderer?

Custom shader? Yes.
Shader Graph? No.*

  • Apart from HDRP since that’s a deferred renderer so it’s rendering to multiple targets by default for the PBR and Lit Master nodes, but you can’t control exactly what.

If you want a shader that renders to multiple targets you just have to write a custom vertex fragment shader, like you would have for the built in renderers before this.

I was under the impression not using ShaderGraph in URP is likely to break with future updates (and its not documented?).

Correct.

It’s also the only option for doing a lot of things because Shader Graph is exceptionally limited.
And using Shader Graph isn’t a guarantee that shaders will work in future versions. They’ve already broken stuff a few times on updates…

Is there any example of this? (using custom shader) I did look at the post processing in urp and the shader looks simple enough, but I don’t want to set up post processing, I want normal rendering to write to both main screen buffer and my other custom render texture using mrt (in URP)

That requires significantly modifying the URP. Existing examples of what you’re looking to do are all done with custom render features, which re-render the scene with different shaders. Similar to the replacement shader system of the past. I don’t know of any examples of what you’re looking to do, since that falls under the realm of what amounts to about the same work as writing a custom SRP from scratch.