Jump to content
  • Advertisement
Sign in to follow this  
Lunpa

depth buffer and height mapping hijinx

This topic is 3455 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

Hello Everyone; I want to write a small demo which shows a city and uses a height map for the terrain; In particular, I want the roads to be smooth, but the edges to be consistent more or less with the height map; so I was thinking a cheap way to do this would be to render the height map first, and then clear the depth buffer before rendering the road. But I want other objects on in the scene (eg buildings) to be able to intersect with the height map as if the depth buffer were never cleared. Is there a simple way to do something like this, such as to copy the data from the depth buffer elsewhere before clearing it, and then restore it after the road has been drawn? Thanks, -Lunpa

Share this post


Link to post
Share on other sites
Advertisement
Do'h, I could just disable the depth buffer and re-enable it again.


Haha, never mind folks.

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!