- Home /
Apply image effect directly to object (Unity 2D)
After making several researches I found the Image Effect Unity component. However, it seems that it only applies to the camera. And I need a way to apply effects to objects in general.
The biggest challenge is that I need to apply different effects (blur) in different layers. Example:
Layer deepest: 4x blur
Layer deep: 2.5x blur
Layer near: 0.5x blur
Layer nearest: no blur
With that I can give a sense of depth in the image. Especially because I plan move each layer in different speeds. More deeper, more slow, for instance.
Answer by paifu · Apr 09, 2015 at 03:33 AM
You have to use at least 4 different cameras.
Just apply 4 differents tags on the gameobjects on the different layers, the create 4 cameras with a specific culling mask for one of those tags. Then apply the blur effect on each camera with a different value.
A bit late, but for those wo run into such problems (like me at the moment): Your approach does not work as intended, as you can ONLY show the screen from ONLY ONE camera at once. $$anonymous$$eans, if you need to have multiple gameobjects glowing in different types, you won't get it solved with "just" more cameras.