Table of Contents
Warning
The DistanceToNearstSurface function has a known issue in UE5.3, resulting in a blocky output. This bug will be addressed and fixed in UE5.4. For more details, refer to https://issues.unrealengine.com/issue/UE-150397.
End Result

Shader Graph

Settings
Please remember to deactivate the “Affect Distance Field Lighting” option for objects where you do not want the distance field effect to be generated, such as the river water itself.

Reference and Credit PrismaticaDev: https://www.youtube.com/watch?v=yzvq8aonDYQ