Jump to content
  • Advertisement
Sign in to follow this  
Mitchell314

What method is the quickest for depth testing?

This topic is 3857 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 thought depth testing meant having a depth buffer (as an array) where the depth of pixel chunks were stored. But I've seen somewhere (I don't remember where) that depth testing might have been spatial sorting (using nodes I think). So, which method would be quicker: sorting polygons by distance from the camera, or using an extra screen buffer? I'm thinking that the load is around a couple hundred triangles. And are there faster methods?

Share this post


Link to post
Share on other sites
Advertisement
Simply sorting polygons isn't good enough if it's possible for two polygons to intersect - in that case (if you didn't have a depth buffer) you would have to split the polygons into smaller ones and re-sort.

Modern depth buffers (in graphics cards) aren't implemented as arrays any-more; they're hierarchical, like a quad-tree, so they can quickly reject hidden pixels.

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!