Texture Following Mesh

I have a plane that I curve deformed to make it look like a curving road. Is there a way to get the texture to follow the contour of the mesh without UV mapping it?

Never mind. I figured it out. I UV unwrap the plane, then set my texture to UV, and scale the size to -10 or whatever and it works perfectly.