© Kyle Halladay 2019
Kyle HalladayPractical Shader Developmenthttps://doi.org/10.1007/978-1-4842-4457-9_3

3. Using Textures

Kyle Halladay1 
(1)
Bristol, UK
 

While it’s possible to make games with art assets that only use vertex colors, like our triangle in the last chapter, it would take millions of vertices to render an image as detailed as the parrot photo in Figure 3-1. This would not only mean that games needed very complicated meshes to display an image, it would also make it very difficult to swap images out if they needed to change later. For these reasons, most games don’t use vertex colors, which can only vary on a per-vertex basis, to render detailed surfaces. Instead, they use image files to provide information that can vary on a per-fragment ...

Get Practical Shader Development: Vertex and Fragment Shaders for Game Developers now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.