Using Standard Asset Package > Effects > Image Effects > TiltShift (but would like to know for any effects)
I have attached TiltShift to my Main Camera, it makes the background look really good; however, the UI is also getting blurred.
How can I stop this from happening?
Setting the render mode to Screen Space - Overlay might work for many people, but for those who have custom shaders that need a camera this may be an alternate solution, if you’re using the Universal Render Pipeline:
- Create a duplicate of the Main Camera, Call it UI Camera.
- Remove all scripts and the audio listener from the UI Camera.
- Uncheck Post-Processing on the UI Camera.
- Set the UI Camera as a child of the Main Camera and reset its transform.
- Use the UI Camera as the source for the Canvas in Screen Space - Camera mode
- Set the Main Camera to have Render Type - Base (which is default).
- Set the UI Camera to have Render Type - Overlay.
- Add the UI Camera to the Stack in the Main Camera.
- Uncheck UI from the Main Camera’s Culling Mask.
- Uncheck everything except UI from the UI Camera’s Culling Mask.
This should keep the UI rendering on top of everything else, while still benefiting from the camera space rendering, while ignoring the Post Processing.
Hope this helps, it worked for my case (adding a blur element to the UI).
Figured it out… Although I don’t fully understand it, this fixes it.
Basically previously my Canvas was setup like this: http://i.imgur.com/5dqb14V.png
With Rendermode set as Screen Space - Camera.
I simply change it to screenspace overlay and the blur is removed. New settings: http://i.imgur.com/0tYYLT3.png
If you’re not using more than 1 Camera, just remove the Main Camera object under Render Camera when you’re in Screen Space - Camera. The Render Camera picks up all of the post processing scripts the object you put in there. The UI will automatically overlay over the main camera but this way it won’t pick up the post processing scripts.