Hello guys, I have discovered a somewhat bug in BABYLON.WaterMaterial.
You can see playground example here https://www.babylonjs-playground.com/#1SLLOJ#573
The problem is that farther that water is from 0,0,0 position, the darker it becomes - even if everything else moves in the same manner.
In that playground there is var offset = 0; Just change that to lets say 200 - whole scene moves for 200 units in x/z direction (meshes, camera, light) and suddenly watter is much darker.
This seemingly doesnt make any sense - when everything is “offseted” by the same number, it should look the same. I thought that coordinates are only “relative”.
I am making game where I am moving my character and camera while scene remains stationary - thus I can go far from 0,0,0 origin, everything else works just fine, except water.
I am quite new into this, so maybe I have missed something, but it seems really clear, that it doesnt work as intended.
Sorry for interruption and thanx in advance for answers.
EDIT: I have noticed that ground mesh is enlighted correctly, but water is just less transparent the farther from 0,0,0 it is.