I am working on a 2d top-down game. I have an object that moves on a single large texture and casts shadow on it (just a blurry dark sprite). However I found out that since my texture has bumps, rocks, creases etc. it looks like the shadow sprite just hovers above the ground.
So I figured out that I could use my texture as a displacement map to distort the shadow sprite depending on the surface of the texture. I'm trying to implement that in Shader Graph but I can't manage to get proper position and scale of the underlying texture to project the shadow on.
I tried to implement a simplified version of the shader that precisely reproduces the part of the Ground Texture that it hovers above.
In this case scaling seems to be off, the resulting texture is a lot smaller than the original one. I'm not sure about the position but it seems to be off as well. Am I missing out something? Or is there an easier appreach to implement this?
Thanks in advance.

