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

10. Normal Mapping

Kyle Halladay1 
(1)
Bristol, UK
 
In the last chapter, we saw our first example of using a texture to store non-color data. In this chapter we’re going to expand on that idea, except rather than store information about our mesh surface’s shininess, we’re going to store information about bumpiness. We’ll do this with a special texture that stores normal vectors instead of colors. Until now, all our normal vectors have come directly from the geometry of our mesh. However, vertex normals can only provide information about the overall shape of a mesh face. If we want to render smaller details, like bumps or scratches, we need another ...

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.