[SOLVED] Post Effects: bloom kills z-index

hello friends!
i use postprocessing from here Post Effects | Learn PlayCanvas
but there is a problem: if u turn on bloom for camera, 2d ui elements will have troubles with z-index and they will render in front of everything, like on screen

how to fix that?

to compare, with bloom turned off

Just to confirm, the UI elements are in 3D space, not in screen space right?

Are the element components on the UI on the same layer as the rest of the world?

1 Like

hey
thx for reply!

  1. ui elements are in 3D space, they have specific position on scene and lookAt player
  2. they are on UI layer, not on world

In which case, they should have been rendering in front of the world before as the UI layer clears the depth before rendering. The fact that it wasn’t before using the bloom is luck/unexpected.

Change the elements to be on the World layer and see if that helps

1 Like

you mean like that?
image

it just killed whole scene :rofl:

p.s.
sorry for many posts, can’t put multiple images in 1 post :>

No, change it on the element components

1 Like

ok, thank you so much
it worked
but now black panel is overbloomed

it also depends on camera pov (because bloom script is for camera)

The black panel is probably Z fighting with the white panel and not seen at some angles. Move the black panel slightly away from the white panel and move the text on the black panel slightly away from the black panel

1 Like

ok, you right again, thank you

4 posts were split to a new topic: Using Post Effects Bloom with World UI causes depth issues