After add postProcess,the sky looks like a white overlay layer has been added

Created a dynamic skybox
The sky is blue, but after adding a post-processing to the scene, the sky looks like a white overlay layer has been added.

The code snippet to add the post-processing is at lines 409-419.

cameras = scene.cameras;
    let defaultPipeline = new BABYLON.DefaultRenderingPipeline(
            true, // is HDR?
    let imageProcessingConfig = scene.imageProcessingConfiguration;
    imageProcessingConfig.isEnabled = true;
    imageProcessingConfig.contrast = 1;
    imageProcessingConfig.exposure = 1;

What is causing this and how can I overcome it?


HDR is causing this, set it to false:

This is caused by the HDR tonemapping (remap the [0, infinity] range to [0, 1]. Different tone mapping give different results for this kind of stuff.

1 Like

When using hdr, we are also rendering in linear space before the post process meaning the clear color is now understood in a different space.

You could also fix it by keeping hdr, which is better for rendering and adapt you clear color:

scene.clearColor = scene.clearColor.toLinearSpace();

Modify the post-processing contrast to enhance the visual effect of the scene.
And after actually modifying the post-processing contrast there is no change in skyBox, how can I overcome this problem.

Modify lines 418-419 of code,
With before modification, skyBox has no enhancement effect.

This is because without hdr by default the image processing is inline meaning it should be applied in the shader. As your shader do not implement it, it needs to be done in post process requiring your shaders to render in linear space.

1 Like

We’ve tried a few things, but we can’t get it to work.
Need help with specific code snippets to overcome this problem

1 Like