Jump to content
  • Advertisement
Sign in to follow this  
NickyP101

How deep does the screen go?

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

Advertisement
To be more precise, as far as you set the far clipping plane of the frustum (either in gluPerspective(), in glFrustum(), in glOrtho(), or manually in the projection matrix).

Share this post


Link to post
Share on other sites
Just remember that if you set it too far, you lose Z-Buffer accuracy, so things that are close in Z-depth will end up Z-fighting. It is better to set the distance as close as possible so the Z-buffer is more accurate.

Share this post


Link to post
Share on other sites
Comparatively, the zNear value (ie. how close to the camera an object will be clipped) has a much more significant effect than the zFar value. You can safely put your zFar value at 100000.0, if you have a zNear of 1.0 or 2.0.

See this useful link: Learning to Love your Z-buffer.

Share this post


Link to post
Share on other sites
Quote:
Original post by baldurk
Comparatively, the zNear value (ie. how close to the camera an object will be clipped) has a much more significant effect than the zFar value. You can safely put your zFar value at 100000.0, if you have a zNear of 1.0 or 2.0.

See this useful link: Learning to Love your Z-buffer.


Good point. I've never checked to see exactly how safe it is. I've never had to go that far, but I do agree and know that the Z-near value has more effect due to how the depth is calculated.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!