ZBuffer problems in 16 bit?
Hi, I've come a long way with the graphics for my game now, but I've noticed an infuriating bug! When I change the colour mode to 16 bit, I've noticed an infuriating bug.
Polygons seem to overlap where they're not meant to, and the textures seem to shear and crop in unusual places, as the world matrix rotates. It's hard to explain, so I've included a screenshot below to show what I mean.
I'm using a 16 bit depth buffer so that can't be the problem.
Has anyone got any suggestions to what might be causing the bug?
Thanks
[edited by - OklyDokly on April 19, 2003 11:10:33 AM]
[edited by - OklyDokly on April 19, 2003 11:10:56 AM]
Solved it!!!
The problem was I set the near clip plane too close to the surface in the projection matrix! Is this a bug in directx, or is it meant to be the case?
The problem was I set the near clip plane too close to the surface in the projection matrix! Is this a bug in directx, or is it meant to be the case?
Hi guys
I see you topics , and i have your problem.
when i zoom out of object , the polygon is crash or overlap..
my near plane is 0.01f
when I set to 1.0f , it ok.
is this DirectX bug?? because I work in openGL is no this bug
the near plane always set to 0.01f
thanks you topics.
I see you topics , and i have your problem.
when i zoom out of object , the polygon is crash or overlap..
my near plane is 0.01f
when I set to 1.0f , it ok.
is this DirectX bug?? because I work in openGL is no this bug
the near plane always set to 0.01f
thanks you topics.
The closer an object is to the front, the higher resolution the z-buffer is. The closer you set the near clip plane, the lower resolution it leaves for the rest of the view. I have my view distance set at like 2.0 normally, and I NEVER have any of these problems. 0.01 is just way to close unless you''re using a very small far clip also, otherwise, there just isn''t enough precision far out to control z-fighting amongst close polygons.
Cool,
I think I know what you''re saying. One thing I don''t understand though is why this problem doesn''t present itself in 32 bit color, since the Z-Buffer is set to the same resolution. Maybe it''s just my card or something, I think my Dad''s comp has clipping problems at 32 bit colour.
Thanks anyway
I think I know what you''re saying. One thing I don''t understand though is why this problem doesn''t present itself in 32 bit color, since the Z-Buffer is set to the same resolution. Maybe it''s just my card or something, I think my Dad''s comp has clipping problems at 32 bit colour.
Thanks anyway
What can hold more precision 32-bit or 16-bit? 32-bit . Some cards set z-buffer to color depth automatically, while others use 16-bit automatically... depending on which cards you guys have, it's very possible that his is only using 16-bit even though the color depth is 32-bit. There should even be a driver option in most recent cards to "force 16-bit z buffer", or to use the color depth as the z buffer depth, or to use application default. When creating your window, you can specify the z-buffer depth that you request, but the graphics card can take this and toss it out the window and use what it likes.
--- Edit ---
Just wanted to clarify... color depth, and z-buffer depth are NOT the same thing, they are 2 seperate params when you create your window, so you could have 32-bit color with a 16-bit z-buffer, or 16-bit color with a 32-bit z-buffer, or any combination, provided the drivers aren't set to use something besides applications preference.
[edited by - Ready4Dis on April 20, 2003 8:41:39 AM]
--- Edit ---
Just wanted to clarify... color depth, and z-buffer depth are NOT the same thing, they are 2 seperate params when you create your window, so you could have 32-bit color with a 16-bit z-buffer, or 16-bit color with a 32-bit z-buffer, or any combination, provided the drivers aren't set to use something besides applications preference.
[edited by - Ready4Dis on April 20, 2003 8:41:39 AM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement