I'm working on a technique that involves generating a heightfield from a shader, and then dropping that heightfield right back down, so that the location of the features of the generated heightfield match those of the shader.
This works fine when I'm at (0,0,0). However, the camera position in the scene that I'm working on is a few kilometers away from the origin along the x- and z-axes. When this technique is applied there, the features don't match up at all. I also noticed that the heightfield bounding box is hovering about 2.7 meters above the ground because of the slight curvature of the planet, and it is impossible to adjust the y-position of the heightfield.
If anyone has any ideas on how to make the heightfield and the shader match properly, they would be much appreciated.