Is there no better way than renderingGroupId? Here is my issue:
I have a swimming pool mesh
with translucent water texture on top
and bubble particle effects above the water
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.