Bloom script is effecting element entities

This how it works. All layers before postprocessing are rendered to a texture (render target), which has a depth buffer. All works well here, if object is behind another object, it’s not visible due to depth buffer.

Then post processing is applied - this basically renders image from the mentioned render target, into a framebuffer (this is what is displayed on the screen). But the depth data is not (cannot easily be) copied. And so whatever renders after postprocessing has no data in the depth buffer, so it renders over everything. Which usually works well for 2D UI, but not anything in 3D world if it needs to be behind other things.

Typically handling of this usually involves masking what is postprocessed, as it does not have a simple solution. See more here. There were more threads discussing this as well I think.

3 Likes