How to sample terrain texture based on world space

Hi my question is following,how to sample terrain texture based on world space ?
It is need to blend rocks normals with landscape normals to hide seams

Im not a Artist but I can Answer this one =) had todo it myself once