   Read the Zbuffer through a texture
  Hi,I'm trying to read the Zbuffer through a texture.1. I first create the texture for the colorbufferl_hr = GlobalDevice.GetDevice()->CreateTexture(m_target_desc.m_width,m_target_desc.m_height,m_target_desc.m_mips,D3DUSAGE_RENDERTARGET | (m_target_desc.m_automipmap ? D3DUSAGE_AUTOGENMIPMAP : 0),D3DFMT_A8R8G8B8,D3DPOOL_DEFAULT,&m_target_texture,0 );m_target_texture->GetSurfaceLevel( 0, &m_target_surface );2. then I create the texture for the depthstencil:l_hr = GlobalDevice.GetDevice()->CreateTexture( m_target_desc.m_width,m_target_desc.m_height,1,D3DUSAGE_DEPTHSTENCIL,D3DFMT_D24S8,D3DPOOL_DEFAULT,&m_target_depth_texture,0 );m_target_depth_texture->GetSurfaceLevel( 0, &m_target_depth_surface );Everything is properly rendered, with proper Z sorting etc but m_target_depth_texture (texture supposed to contain the zbuffer content) is always white.Any idea?Thank you in advance   
  I presume you're verifying the contents are white via a IDirect3DTexture9::LockRect() operation? If so, you're out of luck:Quote:The only lockable format for a depth-stencil texture is D3DLOCK_D16_LOCKABLE.hthJack   