I want to get the distance from source to destination in the same shader, for instance the distance from water to something under the water. I could copy what is rendered under water by the camera with Graphics.blitz to the water shader and use the _CameraDepthTexture in the water shader but then i would need to know the distance from camera to the water in tthat water shader too and i do not know how to do that as CameraDepthTexture would already have the value of the distance from another camera to the items under the water and if i use Graphics.blitz again to know the distance from camera to water to the same shader i would overwrite the CameraDepthTexture, so how could this be done?
Is everything under the water rendered before the water?
See my answer in your other thread for an example: