Jump to content
  • Advertisement
Sign in to follow this  
genesys

gluPerspective & z-buffer?

This topic is 4258 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! I have a question about the depth buffer. When i use gluPerspective with a near and a far value, i thought that then the depthbuffer gets mapped between these two values. So decresing the range between near and far should also decrease z-fighting problems and vice versa. But somehow for me nothing changes . . . the far clipping changes, but the z-fighting for far objects stays the same... Do i need to set the mapping of the z_buffer somehow separately? thanks!

Share this post


Link to post
Share on other sites
Advertisement
The far clipping plane have virtually no influence at all on the precision distibution in the Z-buffer (assuming a far clip plane at least 100-1000 times the near clip plane). The near clip plane is much more important.

Check this for some information.

edit: To give you a feeling for how important the near clip plane is. Assume you have the near plane at 1 and the far plane at 1000. For a point at depth 500, changing the far clip plane to 1000000 (multiplied by 1000) has almost the same effect on precision loss as changing the near plane to 0.999.

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!