3D GUI + PP imageProcessingEnabled makes the 3D GUI show on top of all

I spent half of my day deconstructing all of my scene, creating tests and PGs for this.
I couldn’t understand why my 3D GUI layer would show on top of my meshes when, in a simple PG, it doesn’t.

Finally, stumbled over this one. Don’t know if it’s a bug or a restriction (such as i.e. the use of scattering with the 3D GUI) but on the other hand, I did not find any warning or information about this.

So, FYI, and from this PG:

Enabling imageProcessing on the default rendering pipeline makes the 3D GUI be visible though all meshes.
Oh, and then, any solution to fix it (like writting to the buffer or anything) would sure be welcomed.
And then, I guess it would deserve a little line in the doc, wouldn’t it?

3d gui renders in its own layer eg after the scene and if you use a post process it unfortunately applies to the scene only removing the depth information breaking all the rendering of the layer.

The limitation should be added in the doc I guess.

cc @carolhmj

1 Like


Yes, I knew this part of the process from the awesome input of @Evgeni_Popov . I was just hoping there would be some sort of trick/workaround.
And then yes also, I suppose a small warning in the doc for this kind of limitation would probably be a good thing.
Thanks for your answer and have a great day :sunglasses:

you could probably try to share the depth information with a depthRenderer setup on the first scene and inrendering it in a post process on the layer sounds like this could work

Something like this: https://playground.babylonjs.com/#HJZBRG#288


Oh, nice. Thank you.
The fun part is that I don’t really need this imageProcessing (at least not at this point). I wasn’t at the point of PP in my scene. Far of actually. It’s only that I copied it from another project and left it there waiting. Didn’t think it would have an impact. Except the default for the image processing is ‘true’. :wink:

I’m gonna keep this for later and also bookmark it. I’m sure it can also be of help for others.
Thanks again and have a great day :sunglasses: