Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Depth buffer value calculation..!

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

Hi all, As some of you are probably aware of the depth buffer isn''t mapped linearly. So, I''m currently doing a project where I need to write the depth buffer values myself and I tried using the equation derived in this document: http://www.cs.unc.edu/~hoff/techrep/perspective.doc The main problem with the above document''s equation is basically that it''s VERY unprecise. The smaller the distance between the near and far clip plane, the more unprecise the calculated result gets! So, what I''m basically looking for here is a link, some help or just something that could point me in the direction of calculating a much more precise value! Even a slight difference on the third decimal is enough to make the depth comparison go crazy! Please.. somebody enlighten me :D

Share this post

Link to post
Share on other sites

  • 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!