• Advertisement
Sign in to follow this  

Windows Phone 8 Depth Buffer access

This topic is 1853 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
Sign in to follow this  

  • Advertisement