- Home /
Can you use a camera effect that only applies to a certain layer?
Hi,
I would like to use a blur effect but only on certain objects. Is there a way I can put these objects on a certain layer, and have the blur only affect that layer?
Answer by sean · May 06, 2010 at 09:40 PM
Not sure if you can do it with a single camera, particularly given the nature of post-processing filters on the graphics card, but under certain circumstances you may be able to do it in multiple layered renders.
On one camera set to the full game screen, render only the layers you want sans-blur. On another camera set to the same params outputting to the same space, render only the layers you want blurred. If objects in the two layers don't intersect or clip eachother, just be sure to set the render order of the far-stuff camera to before the near-stuff camera and you should be set.
Otherwise, you may need a third pass and some special programmatic shader work to render a clipping mask texture (render ALL layers with a shader/filter that, rather than outputting to screen, writes a 0 to a texture when the rendered pixel is from one layer group and a 1 when it's from the other) and then plug that clipping mask into a filter on one camera or the other so that pixels only get drawn to the screen if they're part of what ~would~ be seen in that camera's layer set if it was being rendered with everything else.
I am sorry but i didnt understand the answer, I have similar problem http://answers.unity3d.com/questions/376851/can-i-blur-only-part-of-the-objects-on-my-scene.html can you please look at my question and tell me what am i doing wrong?
Your answer
Follow this Question
Related Questions
Blur without Pro 1 Answer
Camera Effect for partially Underwater View 0 Answers
motion blur without unity pro 1 Answer
camera blur effect 1 Answer
Unity 5.6 splash screen tool: Blurry background image 0 Answers