I know is a bit late but recently wanted to do the same and couldn’t find a solution. Did it in blueprint and post.
how it looks with super basic material and art.
blueprint that does the interesting bit
basic post material set up.
Takes the world position of the blueprint, uses its Z height for the waterline. Works out where position intersects with the camera planes highest and lowest point in the world then outputs as a float between 0 and 1.
The literal float is the near clip distance, which you can get from engine.ini or default engine depending on if it has been modified. Might not work properly if you have the game running minimized. Could do extra material set up to make work
regardless of screen size.