Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

OklyDokly

ZBuffer problems in 16 bit?

This topic is 5714 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post


Link to post
Share on other sites
Advertisement
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?

Share this post


Link to post
Share on other sites
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.



Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!