Normal Mapping

A very powerful and popular technique among real-time 3D applications is normal mapping. Normal mapping creates the illusion of highly detailed geometry on a low-poly model by storing surface normals in a texture map that can then be used to calculate the lighting of the objects. This method is especially popular in modern games, since this allows developers to strike a balance between high performance and scene detail.

Typically, lighting is calculated by using the surface normals of the triangles being rendered, meaning that the entire polygon will be lit as a continuous, smooth surface:

With normal mapping, the surface normals ...

Get Real-Time 3D Graphics with WebGL 2 - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.