Disposing the Default Render Pipeline does not change the rendering appearance


I am working on an application using the Default Rendering Pipeline only on some parts of the app. Hence, when I do not want to use the Default rendering Pipeline, I simply dispose it. When I need it again, I create another DefaultRenderingPipeline object.

It works perfectly fine in version 6.3.1. On the contrary, it does not work anymore on version 6.23.0

Here is a playground illustrating the issue: https://www.babylonjs-playground.com/#4JPETG#8

When the Default Rendering Pipeline is disposed, it does not show in the Inspector anymore, as intended, but the render still applies the image processing parameters of the Default rendering pipeline (such as contrast, exposure…). Is it an issue when detaching the rendering pipeline? I could not find any relevant changes to the rendering pipelines in the changelogs.

Thanks in advance for your answer,



Hey @Squeele, welcome to the forum,

In your PG the only parameter you are using are the one from imageProcessingConfiguration which can also be used in place in the materials (standard and pbr) in order to prevent a full screen pass which might be quite convenient.

If you try here https://www.babylonjs-playground.com/#4JPETG#9 you will see the gamma correction of the clear color being turned on/off. You can also use spector to see it.

1 Like

Hi @sebavan

Thank you for your response!

In my app, I use many other parameters of the rendering piepline (color curves, FXAA…). I used the image processing configuration in the playground for the sake of simplicity.

What I find strange is that for example, disposing the SSAO Rendering Pipeline works perfectly fine: https://www.babylonjs-playground.com/#4JPETG#10

When the SSAO rendering pipeline is disposed, occlusion is not shown on screen anymore. On the contrary, when disposing the default rendering pipeline, the image processing still shows on screen even though the pipeline is not shown in the inspector anymore.

Maybe I could take a peek in the dispose function of the default rendering pipeline?

Image Processing is shared in this way as it is pretty handy to share all the props with all the materials when used outside of post processes but I agree it has its own quirks…

As a workaround you can use your own config to avoid the sharing issue:
defaultPipeline.imageProcessing.imageProcessingConfiguration = new BABYLON.ImageProcessingConfiguration();

And on dispose let the default config know it is not used in a post process anymore:
scene.imageProcessingConfiguration.applyByPostProcess = false;