Per-pixel lighting (the lighting we were trying to get to) calculates the lighting for each pixel on the fly using the NVIDIA Shading Rasterizer. For per-pixel lighting/shading to be used, a developer must create a "normal map" for a texture map, but this is easy because they just have to run a height map through a filter. A normal is basically the direction a pixel or polygon is facing, so a normal map is a map of the direction pixels are facing. Each value means a different direction, which is used when calculating lighting.
The normal map is then encoded into a texture map that is to use per-pixel lighting. A normal map is similar to a light map in that it calculates lighting on a per-texel basis for the object being lit. Unlike with light mapping and like vertex lighting, per-pixel lighting calculates lighting on the fly. But unlike with vertex lighting, the normal map gives a normal for each pixel, which is then used to calculate lighting. Vertex lighting, as we said, calculates lighting from normal at each of the polygons vertices, then interpolates the lighting among the pixels of the polygon.
This image shows how the lighting values for each pixel are calculated in per-pixel lighting.
Here is a picture of a normal map. In the normal map on the right, green means the pixel is facing towards the up right, yellow means up left, red means down left, and blue means down right.
Here is a picture of the normal map on a quad with a diffuse yellow light coming from the upper right hand corner.
So through the magic of normal maps, you get a quad that looks like a diffuse lit sphere.
Here is another example of per-pixel lighting.
Just for comparison, there is a form of lighting in between per-pixel and vertex known as Phong shading. Phone shading interpolates normal values for each pixel from the normal values of each of the vertices of a polygon, then it calculates the lighting of each pixel from these normal values in a way similar to how per-pixel lighting calculates these values for each pixel from a normal map.