   32 bit z-buffer not possible?
  i'm kinda confused. i've looked on my code to create the direct 3d device and some other data as well, but i've noticed that i am only creating a 16bit z-buffer ( i just pasted this code out of a tutorial, without really knowing what it does *rolleyes* ) i've forgotten to see what i need to change there, but now, that my scene is advancing, i am facing some z-buffer problems, at least i think they are caused by the buffer. my far clipping plane is 50.000 units away from the camera, wich will lead to a very bad precision after some 1000 units from the camera ( i once read an article on how the zbuffer stores the depth value, but it is no longer available ). when 2 objects interfier with each other, the pixel at the border disappear and appear, but only when the camera moves ( and obviously the zvalue of the pixels ). the funny thing is, i can't create a 32biz zbuffer on my device. the succeded function fails...D3DDISPLAYMODE d3ddm;if(!g_bFullScreen)    g_pD3D->GetAdapterDisplayMode(D3DADAPTER_DEFAULT, &d3ddm); D3DPRESENT_PARAMETERS d3dpp;ZeroMemory( &d3dpp, sizeof(d3dpp) );d3dpp.Windowed = true;d3dpp.BackBufferCount  = 1;d3dpp.EnableAutoDepthStencil = TRUE;d3dpp.AutoDepthStencilFormat = D3DFMT_D32; // 32-Bit z-Bufferd3dpp.PresentationInterval = D3DPRESENT_INTERVAL_ONE;d3dpp.SwapEffect = D3DSWAPEFFECT_COPY;d3dpp.BackBufferFormat = d3ddm.Format;d3dpp.FullScreen_RefreshRateInHz = 0;the sdk says that i can use D3DFMT_D16 if the backbuffer format is 16 bits or less, or D3DFMT_D32 otherwise. but the second call does not work! how can this be possible? is this a hardware specific problem? shame on my gpu (GeForce 6600 GT) if so, because all other modern games run ( Ghost Recon 3 etc.. )what can be the problem?   
Quote:i once read an article on how the zbuffer stores the depth value, but it is no longer availablelearn to love your z-buffer - it's all you need [smile]Have you enumerated your driver/hardware for 32bit support? You really should be using IDirect3D9::CheckDepthStencilMatch() to check - assuming anything is dangerous.I dont think the 6-series supports 32bit depth buffers - my 6800 reports D16, D24X8 and D24S8. Try using D24X8 - a 24bit buffer is a lot better than a 16bit one.hthJack   ;Quote:Original post by jollyjeffersQuote:i once read an article on how the zbuffer stores the depth value, but it is no longer availablelearn to love your z-buffer - it's all you need [smile]eeek... its gone? Really should've checked that before posting, but I'm getting Unable to determine IP address from host name for www.sjbaker.org on that page now. Anyone else getting that?Would be a real shame if that page was gone [sad]Jack;  this is the article i was refering to in my first post, and i've forgotten some of the details, wich is why i don't know exactly which settings are possible and not ( and how the z-buffer really works, i just remember that 0.0 to 1.0 thing with less precision to 1.0 ^^ )using a 24bit z-buffer worked, but why doesn't a 32bit? i am not that familiar with the hardware architecture of a gpu. is it just too less precision win between 24 bit and 32? or is it something else?apart from that, is there a difference between 24x8 and 24s8?   ;Quote:Original post by SiS-Shadowmanthis is the article i was refering to in my first post, and i've forgotten some of the details, wich is why i don't know exactly which settings are possible and not ( and how the z-buffer really works, i just remember that 0.0 to 1.0 thing with less precision to 1.0 ^^ )Most good computer graphics textbooks will cover the topic; its just that website was the most straight-forward and to-the-point.Quote:Original post by SiS-Shadowmanusing a 24bit z-buffer worked, but why doesn't a 32bit? i am not that familiar with the hardware architecture of a gpu. is it just too less precision win between 24 bit and 32? or is it something else?Difficult to say exactly why its not supported - but it is purely down to the hardware. I don't know enough about the low-level side of the 6-series architecture, but presumably theres something missing there. It could also be a simple case that they decided that a 32bit depth buffer wasn't important enough to dedicate silicon to...Quote:Original post by SiS-Shadowmanapart from that, is there a difference between 24x8 and 24s8?Not a lot - the latter just gives you 8 bits of stencil buffer as well as 24bits of depth. The former just has a padded 8bits at the end (which would make it a full 32bits, so go figure why a "pure" D32 format isn't allowed [rolleyes]). You dont get direct access to the binary layout of the depth buffer, so unless you're using a stencil buffer the different is largely irrelevant ....hthJack   ;  thanks very much. i think i'll stick to that 24S8 for volumetric shadows, i've tested shadowing with a depth map before, but that's not my thing ^^   ;  I remember some ATI cards had the option in the control panel to enable 32 bit Z buffer. Anyway, checking the card list in the SDK, it seems that few support it. (Not that I trust that list implicitly, and it won't take into account a control panel switch.)   ;Quote:Original post by jollyjeffersQuote:Original post by jollyjeffersQuote:i once read an article on how the zbuffer stores the depth value, but it is no longer availablelearn to love your z-buffer - it's all you need [smile]eeek... its gone? Really should've checked that before posting, but I'm getting Unable to determine IP address from host name for www.sjbaker.org on that page now. Anyone else getting that?Would be a real shame if that page was gone [sad]Jackbehold the power of google cache;Quote:Original post by ranakorbehold the power of google cacheGoogle cache doesn't work in China (thanks to the Great FireWall)... However, the WayBack Machine does, and has a more complete archive of the Internet, with snapshots taken at several dates, thus making it more useful than the Google cache anyway. Take that, Public Security Bureau!http://web.archive.org/web/*/http://www.sjbaker.org/steve/omniv/love_your_z_buffer.html