Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualHodgman

Posted 22 November 2012 - 05:17 AM

I tried lowering the z distance to 500, but it was already only 5000 which is well below 16 bit.

Depth buffer values are stored logarithmically, which means approximately half of your precision is used to represent the values between the near plane and twice the near plane.
This is a simplification, but to illustrate -- with a 16-bit buffer imagine a pixel with depth of near == 0x0, a pixel with depth of far == 0xFFFF, and a pixel at 2 * near == 0x7FFF.
So, it's very important that you don't use a small value for the near plane. The far-plane isn't very important in comparison.

#3Hodgman

Posted 22 November 2012 - 05:15 AM

I tried lowering the z distance to 500, but it was already only 5000 which is well below 16 bit.

Depth buffer values are stored logarithmically, which means approximately half of your precision is used to represent the values between the near plane and twice the near plane.
To illustrate -- with a 16-bit buffer imagine a pixel with depth of near == 0x0, a pixel with depth of far == 0xFFFF, and a pixel at 2 * near == 0x7FFF.
Which means it's very important that you don't use a small value for the near plane.

#2Hodgman

Posted 22 November 2012 - 05:15 AM

I tried lowering the z distance to 500, but it was already only 5000 which is well below 16 bit.

Depth buffer values are stored logarithmically, which means approximately half of your precision is used to represent the values between the near plane and twice the near plane.
To illustrate -- with a 16-bit buffer a pixel with depth of near == 0x0, a pixel with depth of far == 0xFFFF, and a pixel at 2 * near == 0x7FFF.
Which means it's very important that you don't use a small value for the near plane.

#1Hodgman

Posted 22 November 2012 - 05:14 AM

I tried lowering the z distance to 500, but it was already only 5000 which is well below 16 bit.

Depth buffer values are stored logarithmically, which means half of your precision is used to represent the values between the near plane and twice the near plane.
e.g. with a 16-bit buffer a pixel with depth of near == 0x0, a pixel with depth of far == 0xFFFF, and a pixel at 2 * near == 0x7FFF.
Which means it's very important that you don't use a small value for the near plane.

PARTNERS