Jump to content
  • Advertisement
Sign in to follow this  
88er

Why i can't change the depthbufferformat.

This topic is 3581 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

I update my engine to d3d2007,but when i change the depthbuffer format form D3DFMT_D16 to D3DFMT_D24S8 use setting dialog,it looks no change. even i Createdevice use D3DFMT_D16 and D3DFMT_D24S8,it get same result. directx version :4.09.0000.0904 videovard :NV 8600GTS video driver:2008.8.12 Is it a bug of d3d2007,it works fine in the oldversion. [Edited by - 88er on December 22, 2008 11:08:34 PM]

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by 88er
I update my engine to d3d2007,but when i change the depthbuffer format
form D3DFMT_D16 to D3DFMT_D24S8 use setting dialog,it looks no change.
even i Createdevice use D3DFMT_D16 and D3DFMT_D24S8,it get same result.
What "same result"? What setting dialog are you talking about? Are you calling IDirect3D9::CheckDepthStencilMatch? NVidia cards frequently require that the depth buffer and colour buffer are the same bit depth.

Share this post


Link to post
Share on other sites
The setting dialog like d3dsample use F2 to Change device.

my application works fine in NV 6600GT,someone side nv8 can't set depthbuffer bit.

Share this post


Link to post
Share on other sites
Quote:
Original post by 88er
The setting dialog like d3dsample use F2 to Change device.

my application works fine in NV 6600GT,someone side nv8 can't set depthbuffer bit.
Define "can't set depthbuffer bit". What happens when you try?

Share this post


Link to post
Share on other sites
I think nothing happen and no error report.
The picture quality hadn't imporved from D3DFMT_D16 to D3DFMT_D24S8,
no change happen.

sorry for my bad english and thanks anyway.

Share this post


Link to post
Share on other sites
Quote:
Original post by 88er
I think nothing happen and no error report.
The picture quality hadn't imporved from D3DFMT_D16 to D3DFMT_D24S8,
no change happen.

sorry for my bad english and thanks anyway.
Why would you expect to see an improvement? The only thing increasing the depth buffer precision will do is possibly fix any existing issues. It won't make the image any clearer or sharper unless there's problems with it already.

Are there problems with the image currently? If so, what are you setting your near and far clip planes to in your projection matrix (Hint: Near clip must be > 0, and preferably > 0.1 and far clip shouln't be too far, <= 1000.0 for a 16-bit depth buffer)

Share this post


Link to post
Share on other sites
when two primitives have similar values in the z-buffer cause z-fighting,
it can be solved by set the depthbuffer to D3DFMT_D24S8 in nv6600gt.
But now,in nv8600gt,the depthbuffer seems can't be changed by my application.
Depthbuffer is fixed to 32bits.

In nvidia forums,someone side "Whilst the Geforce is capable of 32-bit color, the Z-Buffer is limited to 24-bit".

Share this post


Link to post
Share on other sites
Quote:
Original post by 88er
when two primitives have similar values in the z-buffer cause z-fighting,
it can be solved by set the depthbuffer to D3DFMT_D24S8 in nv6600gt.
But now,in nv8600gt,the depthbuffer seems can't be changed by my application.
Depthbuffer is fixed to 32bits.

In nvidia forums,someone side "Whilst the Geforce is capable of 32-bit color, the Z-Buffer is limited to 24-bit".
If you look at the DirectX Caps Viewer (Start menu -> DirectX SDK -> Utilities), in DirectX Graphics Adapters -> [Your adapter name] -> D3D Device Types -> HAL -> Adapter Formats -> [Your current adapter format] -> Depth/Stencil Formats, what formats do you see there? Those are the only formats it's valid to use in your current adapter format.

If you put a breakpoint around somewhere, is the new depth buffer format applied?

Share this post


Link to post
Share on other sites
Dx caps viewer lists D3DFMT_D24S8\D3DFMT_D24X8\D3DFMT_D16\D3DFMT_D32F_LOCKABLE,
I can CreateDevice use every value above(for depthformat) without any error.
But the result looks no different.

Share this post


Link to post
Share on other sites
Quote:
Original post by 88er
Dx caps viewer lists D3DFMT_D24S8\D3DFMT_D24X8\D3DFMT_D16\D3DFMT_D32F_LOCKABLE,
I can CreateDevice use every value above(for depthformat) without any error.
But the result looks no different.
If CreateDevice() succeeds with all of those values, then it's almost certain that the device is using the new depth buffer format.

Why do you expect anything to change? What does your projection matrix setup look like? Are you sure that what you're seeing is a problem with the depth buffer precision? Can we get a screenshot?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!