Graphics Reference
In-Depth Information
view is bound to the pipeline for a particular resource object declaration, it contains the ap-
propriate format. The usage of HLSL resource objects is described in more detail in Chapter 6.
Texture 2D
The second texture type that we will explore is the 2D texture. Since this texture type is
closely related to a standard 2D image layout, it is typically one of the most widely used
types of texture. This resource is organized as a two dimensional grid of elements, where
each element is a member of the DXGI_FORMAT enumeration. The various subresource
forms of a 2D texture are shown in Figure 2.31.
As seen in Figure 2.31, these textures support the use of mip-map levels and texture
arrays in a similar manner as the ID texture did. However, they also support multisampled
resources to implement MSAA. This is the only texture resource type that allows multi-
sampling, and it is hence a very important resource type.
Using 2D textures. Two-dimensional textures are the primary texture resource used in
Direct3D 11. As such, they have many different uses within a real-time rendering applica-
tion. The first and most visible use is that of a render target. The Direct3D 11 rendering
pipeline is the backbone of any real-time rendering software, and a render target is needed
to receive the results of all of the calculations performed in it. In addition, during this ren-
dering process, 2D textures are typically used for the depth/stencil target as well, since the
render and depth/stencil targets are required to match in size and dimension. Once a com-
plete scene rendering has been performed, the contents of the render target are displayed in
the desired output window for viewing onscreen. We will see this usage pattern many times
throughout the remainder of the topic.
Figure 2.31 . Various subresource forms of a 2D texture resource.
Search WWH ::




Custom Search