Skip to main content
GameDev.net gamedev.net
🔒 Locked

depth buffer and height mapping hijinx

Started by Lunpa Jun 2, 2009 at 1:49 PM 0 replies 600+ views
Original Post
Lunpa
Lunpa
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
Lunpa
Lunpa
Do'h, I could just disable the depth buffer and re-enable it again.


Haha, never mind folks.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.