Jump to content
  • Advertisement
Sign in to follow this  

Heightmap Texture Mapping

This topic is 2706 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts


I made a DirectX 9 program that will create a heightmap from a .raw file. Everything works perfectly find except I can't figure out how to project a texture on the entire heightmap. What would be the best way to project a texture on my heightmap?

I can texture map individual triangles with this code:

The numbers represent the vertices:
TerrainTest[0].u = 0.0f;
TerrainTest[0].v = 0.0f;

TerrainTest[1].u = 1.0f;
TerrainTest[1].v = 0.0f;

TerrainTest[2].u = 0.0f;
TerrainTest[2].v = 1.0f;

Here's a short video of it just in case that helps:

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!