Game Development Reference
In-Depth Information
6.1 Texture Coordinates
Direct3D uses a texture coordinate system that consists of a u-axis that
runs horizontally and a v-axis that runs vertically. A pair of u, v coordi-
nates identifies an element on the texture called a texel . Notice that the
v-axis is positive in the “down” direction (see Figure 6.2).
Figure 6.2: The texture coordinate sys-
tem, sometimes called texture space
Also, notice the normalized coordinate interval, [0, 1], which is used
because it gives Direct3D a fixed range to work with textures of vari-
ous dimensions.
For each 3D triangle, we want to define a corresponding triangle on
the texture that is to be mapped to the 3D triangle (see Figure 6.3).
Figure 6.3: On the left is a triangle in 3D space, and on the right we define a
2D triangle on the texture that is going to be mapped onto the 3D triangle.
Search WWH ::




Custom Search