D3D zbuffer

Started by
3 comments, last by Verminaard 23 years, 9 months ago
Does D3DX create a z-buffer for you when you call CreateContextEx()? Looking at the DX7 help files it seems like it should, yet there seems to be no z-buffer in my world after using CreateContextEx.
-------------I am a Juggalo.
Advertisement
If numDepthBits are set to D3DX_DEFAULT, you will get the best available z-buffer.

- WitchLord

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Then something is seriously screwed up... It seems to work fine, but every so often things that are behind and shouldn''t be seen pop in front. The hardware device I''m enumerating is not very good at all (i think it only does 2d). so could this be the reason? Does the hardware do the z-buffer, or is it the software?
-------------I am a Juggalo.
You can use the Dx Caps Viewer to view the z buffer capablitlies..or you can use the GetCaps function

..
Z-buffering can cause artifacts similar to what you describe.

This is because z does not vary linearly in screen space, I believe 90% of the z-buffer precision is used in the first 10% of the screen (I''m not sure if these are the exact correct numbers.)

An alternative is w-buffering, which does vary linearly, but may exhibit artifacts on objects close to the viewer, and is not available on all cards.

This topic is closed to new replies.

Advertisement