Particles with translucent meshes

Is there no better way than renderingGroupId? Here is my issue:

  1. I have a swimming pool mesh
  2. with translucent water texture on top
  3. and bubble particle effects above the water
  4. it’s in a room with walls.

The translucent water texture and the bubble particles both need to be same renderingGroupId as the pool so that I can’t see it through walls. But then the bubbles don’t appear if there is water behind them, relative to the camera

It would be easier to help with a PG, but it seems you forgot to use scene.setRenderingAutoClearDepthStencil(1, false) to avoid clearing the depth buffer between rendering groups 0 and 1. If you do this, you don’t need to use the same renderingGroupId as the pool, you can use 0 for the pool and 1 for the water/bubbles.

1 Like