In most cases, Bloom's intensity-filtered image is rendered for objects affected by it to a low-res FBO and blended with the image at last.
If the bloom is not applied to some objects, Depth Buffer becomes a real problem. for example, the lion is affected by the bloom when the sphere is not. (no blur yet)
The problem is that the "bloomed" lion is only in the bloom FBO and when blended with the final image It doesn't know it should be behind the sphere. and I can't use the same depth buffer because resolutions are different. (image below)
- So what is a good fix for this?
- Should I downsample the depth buffer for the bloom pass?