From the version 2019.2 there is a new Script called “Volume” for Post Processing, I’d like to use it to add glow effects on SOME objects in my scene. But the gloom is global, it either affects all the lighted sprites or none of them. I want to make only some of them glow, maybe based on Layers ?!
I tried local Volumes, but I don’t see any affects and it includes 3D colliders.
Necro, but oh well.
If you want to use different post processing on separate objects then first, assign those objects a different layer from your primary post processed objects… for instance if the only things you want different are “boat” and “car” you could make a layer for “vehicles” (for example) then assign those objects to that layer
Create a new overlay camera, exclude all layers except for “vehicles”.
On your main/primary camera, add the overlay camera (it’s obvious when you find it)
Now, create a new post processing asset, add the asset to a game object with the “Volume” component, then set that in your overlay camera’s rendering.
Also keep in mind, the “local” post processing which utilizes colliders, you may want to assign those post processing objects to a new layer “PP_House” (for example) and then in your Physics matrix under the Physics section of Project Settings make sure it can’t interact with your player with physics. That way you don’t have a giant invisible wall for no reason.
Volumes aren’t used to affect specific objects, more so to define areas that will use a different post-processing preset when the camera passes through that region. There is no way to apply post-processing to a single object - the stack is only supplied the final image as an input and some data about the rendering. If you wanted to apply an effect to a single sprite you would need to use a custom shader that applies the effect directly to the sprite’s texture.
You should look into this Unity - Scripting API: MaterialPropertyBlock
It’s used to set material values per renderer, while allowing said materials to share the same shader instance