Water Depth Fade with non planar mesh

So trying to follow this tutorial about using depth distance to get darker and murkier water with depth

This is with river meshes (non spline, just modeled w/ the terrain going up and down) the effect doesn’t work and the water becomes invisible especially with flowmaps and world position offset. Is there anyway to do depth fading on a non planer mesh by adjusting the pixel/camera depth nodes? I’m clueless.

Thanks.