How do I make a dissolve shader based on position of another object?

Im using hdrp (idk if thats important) and im new to shaders, I found a basic dissolve shader

but I thought it would look better if an object dissolved at the position the player is looking at. How would I turn this shader into a position based one?