Hi,
It’s hard for me to believe, but it seems impossible to make depth-of-field work (blurring the distance) in 2D games with URP. This seems like such a basic/important visual (which makes Hollow Knight and many other games look great). Here is my experience:
- If you use a depth-of-field post-processor in 2D, it just blurs everything, the Gaussian/bokeh knobs don’t work (see this thread ). The workaround that people seem to use is to make two separate cameras (one for background and one for everything else), and apply depth-of-field post processing to only the background camera. This achieves the goal pretty nicely for non-URP games.
- But in URP you can’t do multiple camera rendering EXCEPT “Base” and “overlay”. For the background-blur effect, you need a background camera, not an “overlay” camera in front, which is the only option. I don’t think you can move the Overlay to be behind the Base (and if you can, it would be a hack since Overlay is designed for being in front). This was easily doable before URP with the “depth” property, but that’s gone now as shown in the unity docs.
Has anyone figured out a way to do this? I can’t find any working example and it’s frustrating. Thanks.