heightfield + texturemapping


i’ve created a heightfield with triangle strips, but i’m stuck with the texturemapping.

How can i create something like a planar mapping (projection from directly above the heightfield)?

Is there any tutorial out there that covers the topic?


Just send the appropriate texture coordinate per-vertex. Assuming your heightfield is x-z aligned (height in y direction), and you want a planar mapping looking from +y, your texcoords are just going to be your x and z coordintes, possibly normalized from 0.0 to 1.0

thank you! It works now