Sorry, I think I posted the wrong video. He has a whole series on water.
The tutorial demonstrated a way to get an accurate depth effect with the camera being at any angle, but it only works on the Z-axis. He did say that for 3D meshes or rotated planes, you could use a less accurate depth effect. I implemented it and it doesn’t look too bad as the changing depth mixes with the refraction effect a bit, but I was still wondering if there are other ways I could approach more accurate depth in 3D.
Here is the correct tutorial video I used and a screen recording of the ocean sphere I am using to test the shader:
Tutorial: Water Depth Shader - UE4 Materials 101 - Episode 24 - YouTube
Screen Recording: https://drive.google.com/file/d/1Bbwrv-9O2tflBe-1IywBW8uIJxxNcJJ4/view?usp=sharing