Hi,
I’m currently using the Built-in Render Pipeline with the Post Processing v2 stack, (Version 2.3.0) and I’m having issues flickering issues with the depth of field effect. Right now, I’ve got sprite renderers to render all the objects in the game, and they are set to use a shader that writes to the depth buffer. The shaders I’m using can be found here: GitHub - traggett/UnitySpriteShaders: An Uber Shader for rendering Sprites in Unity.
I’m using the depth of field effect to achieve a “tilt-shift” look, and it does mostly work, but it often has issues with certain objects; They tend to flicker in/out of focus and the effect is inconsistent with certain larger sprites.
Here’s a video of the issue:
You can see that the trees, especially at the bottom tend to flicker in/out of focus as the camera moves.
Here’s how the scene is set up from a side-view:
And here are the depth of field settings:
I’ve tried adjusting the clipping planes on the camera, adjusting anti-aliasing settings, and depth of field settings but nothing has alleviated or solved the issue. Has anyone had this issue before and have any advice?
Thanks!