Skip to main content
GameDev.net gamedev.net
🔒 Locked

ugly bug :(

Started by dave768k Jan 23, 2004 at 2:46 PM 6 replies 650+ views
Original Post
dave768k
dave768k
Hi, anybody got an idea why I get these ugly bugs in my game? http://dave.768k.de/pics/bug1.png thx
Drilian
Drilian
It appears, offhand, to be a ZBuffer precision issue.

What type of ZBuffer are you using? What are the near and far planes you have set? And how do they compare to the geometry you''re rendering?
DevLiquidKnight
DevLiquidKnight
This may not be the best help but ill try I have had this problem too. One thing I think it may be related to is your FOV? im not sure though... however one thing I tried adding to my game to try and correct this problem was fog. it made objects further away kinda dissapear :/ but once again im not sure so if anyone else knows that would be great

[edited by - DevLiquidKnight on January 23, 2004 3:58:39 PM]
dave768k
dave768k
thanks for the replies. I use managed directX 9, and didnt added a precision to the vertex buffer. I just generate a device, and then clear the zbuffer. Well Im very new to directX, ^^. Fog wouldn`t solve the problem, because the feet should be seen clearly ^^. But how can I define the ZBuffer in detail?
Pinzmon
Pinzmon
What are the near and far clip plane values set to in your projection set up? It looks like you can probably fix this just by setting your near clip plane value to something greater than 1, but it may also be that your far value is too large.
dave768k
dave768k
Ok, I found the problem. I used the DepthFormat.D16 as the AutoDepthStencilFormat. After changing it to DepthFormat.D24S8 or DepthFormat.D24X8 it is now displayed correctly.
aker_jus
aker_jus
You can also try W-Buffering
GraphicsWare|RenderTechhttp://www.graphicsware.com3D Graphics & Solutions
Muhammad Haggag
Muhammad Haggag
quote:
Original post by aker_jus
You can also try W-Buffering

W-buffering is deprecated.

quote:
Ok, I found the problem. I used the DepthFormat.D16 as the AutoDepthStencilFormat. After changing it to DepthFormat.D24S8 or DepthFormat.D24X8 it is now displayed correctly.

You can partition your scenes into slices, based on z-distance. You order these slices, and render them far-to-near, each with its own z-clear and near/far clip plane values.

Muhammad Haggag

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.