Rendering a normal mapped geometry
Normal mapping is a technique that allows us to increase the details of a model's surface without increasing its geometrical complexity. Using this technique, normal vectors associated with vertices are not used during lighting calculations. They are replaced with normal vectors read from an image (a texture). This way, the shape of a model is unchanged, so we don't need additional processing power to transform vertices. However, the lighting quality is much better and depends only on the quality of a normal map image instead of the complexity of the model.
An example of an image generated with this recipe looks like the following:

Getting ready
Normal map is an image, in which normal vectors acquired from a highly detailed geometry are stored. It is used to simulate the high amount of surface details on a simple (low-polygon) geometry.

For simple lighting calculations, we just need to load positions and normal vectors, but normal mapping requires us to load...