Graphics Reference
In-Depth Information
Figure 2.22. A visual representation of texture mip-maps.
Texture resource mip-maps. All of the various types of textures share the concept of mip-
maps. A mip-map quite simply represents a lower-resolution version of a texture. It is com-
mon for a texture to contain several mip-map levels, with each successive level providing a
half scale copy of the texture contents. Using mip-maps allows for lower-resolution texture
lookups in situations where the highest levels of resolution will not add useful information,
or could even contribute to rendering artifacts. A common example of this is when a textured
model is rendered far from the camera, and a texture applied to the model appears to sparkle
when the model moves. This is caused when the sampling pattern of the rendered image is at
a much lower resolution than the texture content's sampling pattern. By lowering the effec-
tive texture resolution by looking up an appropriate mip-map level instead, the two sampling
patterns can be brought much closer together, virtually eliminating this shimmering effect.
Figure 2.22 visualizes these mip-maps for each of the three texture types. Because
mip-mapping also reduces the effective size of the resources being used, it significantly
reduces texture cache thrashing, which occurs when the texture cache is continually forced
to miss because large chunks of memory are loaded that don't end up being used, which
ultimately leads to very high memory request latencies, and degrades performance.
Each mip-map is considered to be a subresource within the resource itself. Each
mip-map level reduces the size of the resource by a factor of two along each dimension.
The number of mip-map levels is limited by the lowest level containing a single texture
element, which is logical, since you can't reduce the resolution of a 1x1 texture. We will
see later in this chapter how subresources can be selected when creating resource views, as
well as for manipulating resource contents.
Search WWH ::




Custom Search