Interesting topic … some ideas
=> Not sure if unity build-in “_CameraDepthTexture” available in vertex shader. If it is a general texture, it should be available on graphics card which support VTF ( Vertex Texture Fetch ).
=> Another possible solution for your demand. How about calculate the distance on CPU side and then pass to GPU as a vertex shader input attribute ?
I did the rendertexture idea, i now render depth to a rendertexture of my terrain and pass it to vertex shader to mudulate the waves.
I am mainly looking to see if i was missing a straight way to get that depth below the vertex directly inside the shader, from the main or maybe another camera view as well. That would be more efficient than using the rendertextures and the main reason why i thought it might be possible is because of the already possible depth test in fragment shader, so i will test the idea of using the _CameraDepthTexture as well.