Home > other >  DIRECT3D9 depth map
DIRECT3D9 depth map

Time:09-21


Younger brother small contact D3D10/11/12 half a year, now because of the need to send this post for help,

D3D9, I want to save out of the depth map and the depth of the known only D3DFMT_D16_LOCKABLE is lockable in the format, that for the other format what should I do to save depth surface for DDS format file?

Use the D3DXSaveSurfaceToFile? Always returns 0 xdeadbeef is how to return a responsibility?

Please help ~

CodePudding user response:

DX9 depth buffer is not out of my impression, you can consider to Early - z the scene with low modulus render to texture rendering it again on a custom textures,

CodePudding user response:

Depth can be used as a texture, can trigger a "full screen" rectangular rendering, "depth" hard-wired to don't you want a RenderTarget,
Now the hardware support this way:

CodePudding user response:

Thank you all for your help, thank you very much!!!!!
  • Related