O'Reilly logo

Character Animation with Direct3D® by Carl Granberg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Introduction to Normal Mapping

So far in the examples, the Soldier character has been lit by a single light. The lighting calculation has thus far been carried out in the vertex shader, which is commonly known as vertex lighting. Normal mapping, on the other hand, is a form of pixel lighting, where the lighting calculation is done on a pixel-by-pixel level instead of the coarser vertex level.

How much the light affects a single vertex on the character (how lit it is) has been determined previously by the vertex normal. Quite simply, if the normal faces the light source, the vertex is brightly lit; otherwise it is dark. On a triangle level, this means each triangle is affected by three vertices and their normals. This also means that for large ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required