Graphics Reference
In-Depth Information
For arrays of cube maps to be specified in the shader resource view, the D3D11_
TEXCUBE_ARRAY_SRV structure is used. The members of this structure allow for selecting
the mip-map level range to be used, similar to the single cube map version. However,
they also allow for specification of the first texture array element to be used, and then the
number of cube maps that will be visible through the shader resource view. The number
of cube maps is multiplied by six (for the number of faces on the cube) to determine how
many array elements are needed. This is shown in Listing 2.34. Several example resource
subregions are shown in Figure 2.37.
struct D3D11_TEXCUBE_ARRAY_SRV {
UINT MostDetailedMip;
UINT MipLevels;
UINT First2DArrayFace;
UINT NumCubes;
}
Listing 2.34. The members of the D3D11 TEXCUBE ARRAYSRV structure.
Texture2D unordered access view. The unordered access view can also be used to bind 2D
texture resources to the pipeline. Two different subresource configurations can be used,
which follow the same range selection paradigm as seen for the 1D texture resources. Non-
array-based 2D texture resources can only specify a single mip-map level to be exposed to
the unordered access view. This is performed with the D3D11_TEX2D_UAV structure within
the D3D11_UN0RDERED_ACCESS_VIEW_DESC structure, which is shown in Listing 2.35.
Figure 2.37, Various subresource regions of 2D texture arrays for use as texture cubes with shader resource views.
Search WWH ::




Custom Search