World position from depth buffer in fragment shader, can't figure it out?

I’ve read various forum posts on how to get the world position from a depth buffer but no matter what I tried it just won’t work. I don’t know if it’s because of different versions of Unity or something else. I am using 2017.1 now.

I am rendering depth to a texture and then reading it in my shader and it works fine for things that doesn’t need the world position, but I need to get the true world Y value from my depth buffer (to know how deep my water is at that specific fragment).

Has anyone got this working in the latest version of Unity?

I have solved my problem (copied some code from another part of the shader that already gets the depth of the water).