Jump to content
  • Advertisement
Sign in to follow this  
RudiMedia

Windows Phone 8 Depth Buffer access

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

Just a quick question,

is it possible to bind the depth buffer to a shader resource view with FEATURE_LEVEL_9_3?

 

Because I constantly get an error, if I use both D3D11_BIND_DEPTH_STENCIL and D3D11_BIND_SHADER_RESOURCE as flags.

CD3D11_TEXTURE2D_DESC depthStencilDesc(DXGI_FORMAT_D24_UNORM_S8_UINT, static_cast<UINT>(m_renderTargetSize.Width),
		static_cast<UINT>(m_renderTargetSize.Height), 1, 1, D3D11_BIND_DEPTH_STENCIL | D3D11_BIND_SHADER_RESOURCE);

ComPtr<ID3D11Texture2D> depthStencil;
DX::ThrowIfFailed(m_d3dDevice->CreateTexture2D(&depthStencilDesc, nullptr, &depthStencil));

 

//Edit: Found my mistake, the format has to be DXGI_FORMAT_R24G8_TYPELESS

Edited by RudiMedia

Share this post


Link to post
Share on other sites
Advertisement
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!