Game Development Reference
In-Depth Information
Figure 4.7 Opaque red and purple in the RGBA color space(a). A transparent
blue allows other colors to be visible underneath (b).
Vertex Attributes
Inorder to apply color to a model, we need to store additional information foreach
vertex. This is known as a vertex attribute , and in most modern games several
attributes are stored per each vertex. This, of course, adds to the memory overhead
of the model and can potentially be a limiting factor when determining the max-
imum number of vertices a model can have.
A large number of parameters can be stored as vertex attributes. In texture map-
ping ,a2Dimage ismappedontoa3Dtriangle. Ateachvertex,a texture coordin-
ate specifies which part of the texture corresponds to that vertex, as demonstrated
in Figure 4.8 . The most common texture coordinates are UV coordinates , where
the x-coordinate of the texture is named u and the y-coordinate of the texture is
named v.
Search WWH ::




Custom Search