In my game I want to apply bloom, from the standard assets, to only a few objects in the scene. To do that, I set up 2 cameras at the same position and orientation, one with the bloom component and the other without. Then I put the blooming objects on a "Bloom" layer, set the blooming camera to only render objects on this layer, and the main camera to render everything else.
Then I noticed that, if the main camera has a depth lower than the bloom camera, then the bloom camera will apply bloom to everything in the scene. I guess that's because the bloom effect works on everything rendered up to the point the script is executed.
So I made sure that the bloom camera has the lowest depth and clears with a solid color. Main camera does not clear. However, now I lose the illuminated pixels around the blooming objects. I guess they are overwritten by the main camera, since the blooming camera probably did not give them any depth.
Here's a simple scene to illustrate the problem:
Currently the game looks like this:
If I swap the configuration of the 2 cameras (Main camera: lower depth, clear with solid color; Bloom camera: higher depth, don't clear), the game looks like this (exaggerated for demonstration):
What I want is the yellow object to look like that in the last image, and the purple object to look like that in the second last image. How?
Because of company policies, I am limited to Unity 5.4.1f1, and cannot use anything not made by Unity in the Asset Store.