Game Development Reference
In-Depth Information
Chapter 6
Texturing
Texture mapping is a technique that allows us to map image data onto a
triangle; this capability allows us to increase the details and realism of
our scene significantly. For example, we can build a cube and turn it
into a crate by mapping a crate texture to each side (see Figure 6.1).
Figure 6.1:
A cube with a crate
texture
In Direct3D a texture is represented with the IDirect3DTexture9
interface. A texture is a matrix of pixels similar to a surface but can be
mapped to triangles.
Objectives
To learn how to specify the part of a texture that gets mapped to
the triangle
To find out how to create textures
To learn how textures can be filtered to create a smoother image
111
Search WWH ::




Custom Search