View Full Version : Depth Buffer accurecy

03-31-2001, 07:52 AM
Hi all.
I'm trying to build acomplex OpenGL scene, which includes some nice meshes ccombined with water collinding in the etc... As my camera gets far from the water, strange (and..err.. not so nice) visual artifacts begin to appear. My guess was that because my viewing volume was too deep the depth factor was inaccurate. So...I've reduced my viewing depth volume but still I get these artifacts.
Anyone with ideas is welcome to offer any...

03-31-2001, 02:09 PM
I believe the accuracy of the depth buffer is mostly concentrated at the near clip plane.

To get more accuracy at the far end of things, try moving your near clip plane further away. Moving your far clip in, will not have anywhere near as much effect as moving the near clip plane further out.

(I think)

Check how many bits are in your Z buffer, maybe it can be increased?


03-31-2001, 02:27 PM
Yeah, try setting your Z buffer to 24 or 32 bits. I had the same problem earlier today.

Brent Fogarty
04-01-2001, 12:47 AM
Nutty was onto it with the near plane, I find setting it to 4.0 works best and it doesn't require using any more memory for a 32 bit z-buffer.

04-01-2001, 11:59 PM
Setting it to 4.0 work nice in YOUR case, but maybe not for other. Your 4.0 is relative to your far, and might not be good for my far plane if I place it several millions of units away.

04-03-2001, 12:24 AM
Hi all.
Thanks for all your help guys. I've tried it and I'm currently using a setting of 2.0 without incresing my depth buffer bitdepth.
Thanks a lot
C ya around