How can I make a material that merges from one object onto another?
As @Serge has commented, you can get the position of the shading-point in measured in World Space by using the Position output of the 'Geometry' input node. 

You can also get the point measured in any other object's space (carrying that object's transform,) by using the Object output of 'Texture Coordinate' node, and referring to the other object in the slot provided at the bottom of the node.