- Home /
Excluding objects from depth of field.
Hello, I'm using the Shader Replacement depth of field script in my game, but I've found that it doesn't work well with particles. They become blurry no matter what range they are at. Is there any way to remedy this, or perhaps exclude the particle objects entirely from the auto-generated depth texture?
I know nothing of shader-voodoo, you'd probably be helped best here: http://forum.unity3d.com/forums/16-ShaderLab. $$anonymous$$y guess is however that either you'll have to modify the shader to exclude particles or put the particles on an other layer, let an other camera film them and put that over your normal cameras view.
Answer by Rust E · Mar 21, 2011 at 03:42 AM
I have had the same problem, they seem to start to blur once they reach the horizon line.
This is a comment and not an Answer. Would be good to change it to a comment so others would know this question hasn't been answered.
Answer by vfxjex · Nov 29, 2015 at 07:57 AM
Try duplicating your camera and layer your particles so it will only be rendered on the duplicated camera. for now this is the only solution I can think.
Your answer
![](https://koobas.hobune.stream/wayback/20220612132554im_/https://answers.unity.com/themes/thub/images/avi.jpg)