- Home /
Post Processing v2 make the effect visible only on certain layer objects
I have a model right on top of my camera, which blocks the sight. I want to make it blurry with depth of field post processing effect, leaving rest of the view unaffected. Is it possible to do with post processing v2 or is using a shader the only way? I have the layering set correctly, though the post processing affects the whole screen instead of just that model.
Answer by Remy_Unity · Mar 13, 2018 at 01:01 PM
Short answer: no. Post Process has no information of layers when operating and applies to all objects the camera sees.
Long answer: You can probably build a trick by rendering multiple cameras (one with the foreground object and one for the rest) and do yourself the blurring and blending. But this is not really a post process anymore.
@Remy_Unity Tried having a camera on top to have AA and Bloom, though only the other way round works, ie having a camera with effects and on top a camera with no effect. I took care not to mix layers and post process volumes. Do you have any hint ?
What are you trying to do precisely ?
As I stated before, it's not possible to exclude specific objects from post process.
Objects are rendered by different cameras.
Camera 1 - Depth 0
Camera 2 - Depth 1 - Clear depth
I can : Blur Camera1 with no effect on objects rendered by Camera2
I can't : Blur Camera2 with no effect on objects rendered by Camera1
Answer by ParaPix · May 19, 2020 at 09:39 AM
If anyone Googles this and has the same issue, I recommend using CommandBuffers. They will enable you to render an object after the post-process passes have taken place.