Hello All,
I was reading this article on Z-Buffer: Learning to Love your Z-buffer.
I see that the actual value stored in the Z-Buffer is:
[i]z_buffer_value = (1<<N) * ( a + b / z )
Where:
N = number of bits of Z precision
a = zFar / ( zFar - zNear )
b = zFar * zNear / ( zNear - zFar )
z = distance from the eye to the object
[/i]
Is this the same way the Z-Buffer values are stored on all graphic cards? or could it differ?
Thanks!