Z-buffer pixel format
How does the pixelformat look in a Direct3D 16bit z-buffer?
Is it card specific?
From what I have managed to get information about is it some
sort of floating point number in the range of 0.0 to 1.0.
Is this correct? If so, how are these floating point values
represented (bit-layout)? How can I calculate the 16bit value if I know the z-coordinate for a point?
Hi there,
have you tried enumerating the zbuffer formats?
And if you need to get your z values inbetween 0 and 1 how about dividing them by the z distance of your far clipping plane (which is the max z value)?
Jaap Suter
have you tried enumerating the zbuffer formats?
And if you need to get your z values inbetween 0 and 1 how about dividing them by the z distance of your far clipping plane (which is the max z value)?
Jaap Suter
____________________________Mmmm, I''ll have to think of one.
The z-buffer uses unsigned integers to store z-values.
The z-value should be computed so that the far clipping plane is mapped to the maximum value (216-1) and the near clipping plane is mapped to 0.
If you use w-buffer however, the z-value is stored with floats. (I think it is the reciprosal (1/z) that is stored in the w-buffer, but I''m not sure)
The z-value should be computed so that the far clipping plane is mapped to the maximum value (216-1) and the near clipping plane is mapped to 0.
If you use w-buffer however, the z-value is stored with floats. (I think it is the reciprosal (1/z) that is stored in the w-buffer, but I''m not sure)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement