Hi all,
I have a custom render pass for URP. I take the rendered image (color buffer), blur it and store it in a render texture (timing: RenderPassEvent.BeforeRenderingPostProcessing). The pass it self is just some Blit(cmd, source, target, material, 0);
calls, nothing extraordinary.
Everything works fine, except that for some reason if I use that render texture on an UGUI graphic as texture (CanvasRenderer.SetTexture(renderTexture);
) then all hell breaks loose in the Scene View.
Tested on: Unity 2021.2.0, Unity 2021.3.x
It works just fine in the Game View and in the Player. It also works if I open the Frame Debugger.
My guess: maybe it is a timing issue? I do not know when the UGUI rendering grabs the content from the render texture. I could try buffering but then I would require two render textures.
- The Render texture shown in the video (bottom) is not the one I am using. Just ignore it plz. I noticed just now but I do not want to re-record the video.
If anyone knows a fix or has seen this before I would be greatful for any insights.
Thank you.