Distance Field is disappearing while camera moves away - simple foam shader

Hi, i have setup a simple Foam shader and having problems with it.
Once i move the camera away from the surface, at a certain distance the foam effect disappears.
Looks like some sort of culling or LOD thing. I searches for hours in the web, but nothing really solved it. Any ideas on that issue ?
Thx for help
Robin

You could make the distance division be driven by the distance to the camera

The further away you are from the camera the more you have to exaggerate the effect (give it more pixels to make up for the distance)

You can try going into world settings and adjust “Global distance field view distance” if it’s being cut off by the engine itself.

obraz

Hi 3dRaven,

thanks for your quick reply. I already tried to adjust the “Global distance field view distance” parameter, but i`m using Lumen and then unfortunately this parameter is always set to 20000, regardless of the value you enter in World Settings.

Found this in the documentation, but when i raise the value to 800 in post volume, i get a strange effect ( ocean is full of foam and with a strange color )

When Lumen is using Software Ray Tracing, Lumen Scene only covers 200 meters (m) from the camera position, but can be increased up to 800 m with the Lumen Scene View Distance setting in the Post Process Volume. Past the highest Lumen Scene distance, only Screen Traces are active for global illumination.