Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: Z-buffer precision

  1. #1
    Member Regular Contributor
    Join Date
    Apr 2000
    Location
    Portugal
    Posts
    267

    Z-buffer precision

    Hello

    Do you guys know if there is a limit on the Z-buffer range ?
    When Rendering at very far distances, like 200.000 units my z-buffer goes crazy, he messes everything around, both 16 and 32 bit.

    thanks

  2. #2
    Member Regular Contributor
    Join Date
    Mar 2001
    Posts
    340

    Re: Z-buffer precision

    Try to move the near clipping plane a little farther.

  3. #3
    Junior Member Regular Contributor
    Join Date
    Nov 2000
    Location
    Vancouver
    Posts
    110

    Re: Z-buffer precision

    There's a nice equation in the Blue Book (v1.2) under 'gluPerspective':

    Let r = (zFar/zNear),
    then roughly log(base2)r bits of depth buffer precision are lost.

    "Because r approaches infinity as zNear approaches 0, zNear must never be set to 0."

    Great book. Especially once you've gotten the hang of the material covered in the red book.

    -- Jeff

  4. #4
    Member Regular Contributor
    Join Date
    Apr 2000
    Location
    Portugal
    Posts
    267

    Re: Z-buffer precision

    I got it working..,
    thanks guys

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •