New answers tagged directx9
Turns out setting the resolution to 16 bit instead of 32 caused the blurring to go away. Figuring there was some pixel shader using the depth buffer that was able to deal with 16 bit color / 32 bit depth and 32 bit color / 24 bit depth, but not 32 bit color / 32 bit depth. Thanks @DarthMelkor for the Direct3D Ex suggestion. I may look more into that if ...
D3D9 doesn't support constant buffers but all uniforms are placed into one global "constant buffer". You can set multiple float4 constants at once with IDirect3DDevice9::SetPixelShaderConstantF() by passing the number of constants as the last argument.
The old DirectX SDK outlines a method for being able to do this, but it does require that you use Direct3D 9 Ex rather than just plain-old Direct 3D 9. Since 9 Ex is only available on Vista+ this may not suit your requirements. It's covered in the section titled Feature Summary (Direct3D 9 for Windows Vista) and I'll quote it in full: Reading ...
You can read the depth buffer in a pixel shader if you use one of the special formats described at http://aras-p.info/texts/D3D9GPUHacks.html. They are somewhat GPU vendor specific, but you can probably get away with just INTZ support. That lets you either do what you need to do on the GPU, or to use the shader to copy it to another render target that you ...
Top 50 recent answers are included