- Home /
How to ignore DOF with Sprite/default shader?
Hi all.
I'm having trouble with using DOF (image effect) and Sprite/Default shader object in the same scene.
please see the image: (you don’t have to think about stunning art visual...)
the cat's (Sprite/Default shader) right of face is blurring. I see, It caused from he doesn't write depth buffer. I turned on "Visualize" property of DOF component, it didn't show his shadow, as 2nd image.
It seems can solve with write his depth like as 3rd image (I painted).
so I wanna ask to you:
How to handle to write depth buffer in Sprite/Default shader?
I modified Sprite/Default shader Zwrite to On, but it won't work. (sorry for I'm new to shader programming)There is another way for ignore DOF for the sprite? (only DOF. other image effects are needed.)
Thanks for your time!
I think, UI elements will takes same issue. Anyone have idea?? (T ^ T)
Your answer
![](https://koobas.hobune.stream/wayback/20220612081926im_/https://answers.unity.com/themes/thub/images/avi.jpg)