Hey guys,
i’m trying to migrate my game to the latest babylon version and i found out that between 8.55.3 and 8.55.4 my water shaders look different.
8.55.4 have very overlighted shaders. i wonder is it something fixed in babylon and it’s a correct behaviour now and i need to fix my shaders or is it regression and should be fixed on babylon’s side.
my shader Babylon.js Node Material Editor
Thanks!
I’ve created PG and comparing between 8.56.2 and 7.54.2 but there is no difference. https://playground.babylonjs.com/#0J9GIC#2 looks like it’s not shader and not light problem
reproduced problem. https://playground.babylonjs.com/#0J9GIC#3 comment/uncomment 31 line to see difference between true/false and between versions 8.56.2 and 7.54.2
@Deltakosh could you please check?
Deltakosh is currently out, during summer people are taking some well deserved time off so things may be a little slower than usual, but we will get to this.
Ok! I found it. 
Short version: it’s a side effect of a serialization fix, and it only shows up when the HDR flag on DefaultRenderingPipeline is true. Your hunch about the HDR flag was right.
What happened
In 8.55.4 we fixed a bug where a material’s own image processing configuration was never actually saved/loaded (it silently used the scene’s settings instead). The fix was correct in isolation - but it changed behavior for materials that were saved with their own image processing config, which is the case for your NME water shader (#52UDBS).
Why the HDR flag matters
When DefaultRenderingPipeline is created with HDR = true, image processing (tone mapping / gamma) is meant to be applied once at the end, by a full-screen post-process. To make that work, the pipeline flips a flag called applyByPostProcess = true - but it only flips it on the scene’s image processing config.
- Before 8.55.4: your material used the scene config, so it correctly skipped in-shader image processing and let the post-process do it once.
- From 8.55.4 on: your material now loads its own config (with
applyByPostProcess = false), which the pipeline never updates. So the material does gamma correction in its shader and the post-process does it again > double gamma > the “overlighted” / washed-out look. Wrong.
With HDR = false there’s no post-process doing that second pass, which is exactly why toggling line 31 makes the difference appear/disappear.
Your shader and lights are fine. This is on our side. It’s technically a behavioral regression that wasn’t flagged as breaking.
Workaround for now
Until we ship a fix, you can force your material to use the scene’s image processing config after loading it:
BABYLON.NodeMaterial.ParseFromSnippetAsync("#52UDBS").then((mat) => {
mat.imageProcessingConfiguration = scene.imageProcessingConfiguration;
ground.material = mat;
});
I’m looking into a proper fix that won’t break existing scenes. I’ll update this thread.
cc @Deltakosh for visibility (when he is back)
A draft PR with a fix - Fix NodeMaterial overlighting under HDR from default image-processing config by RaananW · Pull Request #18704 · BabylonJS/Babylon.js · GitHub , however, this is an old breaking change, not sure to be honest if we should fix it this way. I’ll wait for some other opinion from the team
i’ll take it out of draft