Should postprocessing affect the GUI?

If I have a scene with a postprocessing pipeline, should it affect the GUI even with a UtilityLayer? That’s what’s happening though I am initializing the GUI like this:

    const utilLayer = new BABYLON.UtilityLayerRenderer(this.scene);
    const adt = GUI.AdvancedDynamicTexture.CreateFullscreenUI('UI', true, utilLayer.utilityLayerScene);

Is this expected? If so, is there a way to render a GUI layer on top of everything?

Yes it is expected, but you can make your GUI not affected by post processes:

https://playground.babylonjs.com/#7CR6WZ#3

(another one: https://playground.babylonjs.com/#7CR6WZ#1)

You need to create an additional camera with a specific layer mask and use this mask for the layer of the GUI (lines 81-84 and 99 in the PG).

2 Likes