Contents
How does depth stencil work in Direct3D 11?
An array of render-target views may be passed into ID3D11DeviceContext::OMSetRenderTargets, however all of those render-target views will correspond to a single depth stencil view. The render target array in Direct3D 11 is a feature that enables an application to render onto multiple render targets simultaneously at the primitive level.
How does a shader read a depth stencil buffer?
An inactive depth-stencil buffer can be read by a shader as a texture. An application that reads a depth-stencil buffer as a texture renders in two passes, the first pass writes to the depth-stencil buffer and the second pass reads from the buffer.
How to configure depth stencil functionality-win32 apps?
In the second render pass the ID3D11DeviceContext::OMSetRenderTargets function is used to set the depth-stencil view to NULL or a different depth-stencil resource and the shader resource view is passed to the shader using ID3D11EffectShaderResourceVariable::SetResource.
Why is the D3D11 stencil buffer not working?
D3D11 ERROR: ID3D11Device::CreateTexture2D: A D3D11_USAGE_DEFAULT Resource cannot have any CPUAccessFlags set. The following CPUAccessFlags bits cannot be set in this case: D3D11_CPU_ACCESS_READ (1), D3D11_CPU_ACCESS_WRITE (1).
How does decaling work in a Direct3D application?
Direct3D applications use decaling to control which pixels from a particular primitive image are drawn to the rendering target surface. Applications apply decals to the images of primitives to enable coplanar polygons to render correctly.
How are render targets set in Direct3D 9?
Render target arrays offer increased performance over individually setting render targets with multiple calls to ID3D11DeviceContext::OMSetRenderTargets (essentially the method employed in Direct3D 9). Render targets must all be the same type of resource.