Sign in to follow this  
Lunpa

depth buffer and height mapping hijinx

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this