In the built-in render pipeline it works as intended as shown in the git repository, but when switching to URP it simply does nothing - no errors.
I haven’t been able find any examples or documentation on MRTs in the Universal RP - does URP actually support this?
I have the same question. And did take a look at the URP postprocess.
the shader part is simple enough, but I don’t want the post processing, but I would like normal rendering happening to two rendering targets. In order to set that up do I have to use command buffer?
I want to write to screen buffer and my other custom rendertexture at the same time using mrt
As far as I know, command buffer is the way to do it. CommandBuffer.SetRenderTarget accepts an array of RenderTargetIdentifier. Each array element should correspond with the output buffer in shader.
It should be easy enough to test it by creating custom scriptable render pass and rendering it to multiple textures.
I just tried to set MRT for a camera using the 2DRenderer. This can’t be done since the engine (I guess the render pipeline) calls SetRenderTargets internally replacing my color buffers with _CameraColorTexture before rendering. I would have to search for the code that manages that in the package and change it. I’m not sure if I’ve enough will to do so.