SLW Shading Model on spherical planet issue

I’m working on a naval/aircraft shooter with a map size of up to 2,000 kilometers. It’s not a space simulator, but maintaining planetary curvature is still critical.

For clarity, I depict the problem in the illustration below.


A material using a “Single Layer Water” shading model is applied to the surface.

So, the water glows when we are on the dark side of the planet, if it is day at zero coordinates and becomes dark when we are on the light side, but at the center of coordinates it is night.

All hard surfaces, clouds and atmosphere are illuminated correctly.

I suspect the issue lies in how the shader model processes DirectionalLight. It likely uses the projection of the DirectionalLight vector onto the Z axis. If the value is greater than zero, the ocean glows as if it were daytime; if it’s less than zero, the ocean becomes dark as if it were nighttime.

I’m looking for any solutions that will allow me to stay on SLW.
Are there any functions I don’t know about or do I need to change something in the engine files?
Is there a way to feed the DirectionalLight vector, rotated based on the player’s position on the planet, into the input of the shader model algorithms?