- Home /
Image Effects in URP (Shadergraph)
Hey there!
I'm working with URP for the first time since I wanted to use Shadergraph for some effects which worked great. Now I'm trying to create multiple Fullscreen Shaders, but I can't figure out how to approach this with URP.
Previously I just used a Blit in the "OnRenderImage" function and used my shader as input, but Blit doesn't exist in URP. I found a package where you can add a Blit function to a URP Renderer Asset. This does apply the shader but completely ignores UI except in World Space.
There has to be a better way to create image effects in URP right?
UI is always drawn after post-processing regardless of pipeline, otherwise you would end up with UI being affected by things like depth of field and therefore beco$$anonymous$$g unreadable. If you wanted UI to be affected by post-processing you would need to draw the UI like a regular object with a custom shader rather than on a canvas.
Thanks, that definitely clears things up. I guess I'll have to sacrifice part of my effect then.
Answer by Noobie1609 · Jun 25, 2020 at 08:54 AM
Please, can you share that package? I really need it 'cause I ran into the same problem -- there is no method OnRenderImage In URP
And as a response to your question -- Im not a profi, but I guess it is normal that image effect shader ignores UI. In standard PostProcessing native URP pack effects also ignore UI (if it is not in the World Space). I think it is because OnRenderImage is called form Camera, so it is an image from CAMERA without any UI. So, to apply shader to UI, it needs to be rendered by camera in World Space
Your answer
Follow this Question
Related Questions
How to blur objects based on distance from the camera using Unity's optimized blur effect? 0 Answers
Using custom RenderTexture in ImageEffects. 1 Answer
How to make a post processing effect using shader graph & PostFX V2 0 Answers
How to get Initial texture in Post-Processing Stack v2 1 Answer
Blacksmith Atmospheric Scattering failing in Unity 5.5 2 Answers