PDA

View Full Version : Z-buffer precision



Bruno
05-01-2001, 08:37 AM
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

ET3D
05-01-2001, 10:05 AM
Try to move the near clipping plane a little farther.

Thaellin
05-01-2001, 10:13 AM
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

Bruno
05-01-2001, 11:10 AM
I got it working..,
thanks guys