How to make terrain deformation not effect tiling

How do I make tiling static? Because when I deform the terrain it deforms the texture if the geometry is not weighted in. Which is not an issue really, but I know that there is a way to make the material tile static and not be effected by the terrain’s mesh.

What I am trying to say is that I want to control the uv layout of the terrain mesh, because when I deform the terrain it stretches the textures out. How do I get the texture to tile consistently and be independent of the topology of the terrain mesh. I want it to be tiled in world space I guess.