thats pretty easy, you just do MIN operation on scene depth, and ray length to the water plane.
Length to waterplane can be calculated like:
(WaterZ - CameraPosition.Z) / CameraVector.Z
Then you just do a Min with that and SceneDepth.
I also suggest you use ExponentialDensity and not just a linear blend, since a linear blend will look very artificial.
FWIW this is the same thing I originally suggested (bounding by Z), and BoxMask was only a suggestion if you need a box like a fish tank or something where you can see out.