Raycasting globe in fullscreen quad shader


Could anyone know how I could achieve raycasting globe surface depth position in postprocess shader?

What I am trying to do right now is in this sandcastle:

But I haven’t been able to match the distance with the depth…

I was able to figure this out, I was accidentally raycasting to other side of globe: