Graphics Reference
In-Depth Information
depth stencil target always matches the size, dimension, and subsample count of the render
target being used. However, for render target views, the 3D texture is actually treated like a
2D texture array, where each depth level of the texture acts like a texture slice. In this case,
a depth stencil view would use a 2D texture array as its required resource type, allowing the
render and depth target types to match. We will take a closer look at each of the available
resource view configurations below.
Texture3D shader resource view. A single type of sub-resource specification is avail-
able for using texture 3D resources within a shader resource view. This is provided in the
D3D11_TEX3D_SRV structure within the D3D11_SHADER_RES0URCE_VIEW_DESC structure.
This structure is shown in Listing 2.43.
struct D3D11_TEX3D_SRV {
UINT MostDetailedMip;
UINT MipLevels;
}
Listing 2.43. The members of the D3D11_TEX3D_SRV structure.
As seen in Listing 2.43, a subset of the total mip-map levels can be chosen for use
with a shader resource view, effectively hiding the other mip-map levels from the resource
view. We have seen these mip-map level range selections before, with the most detailed
mip-map level specified in the MostDetailedMip parameter, and the number of levels to
Figure 2.42. Various 3D texture subresource selections for use with shader resource views.
Search WWH ::




Custom Search