O'Reilly logo

3D Graphics with XNA Game Studio 4.0 by Sean James

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

Phong specular highlights

Our object is now looking very defined, but it is still missing one thing: specular highlights. Specular highlights is the formal term for the "shininess" you see when looking at the reflection of a light source on an object's surface. Think of the highlights like you are looking at a light bulb through a mirror—you can clearly see the light source. Now, fog the mirror. You can't see the light source, but you can see the circular gradiant effect where the light source would appear on a shinier surface. It should be no surprise, then, that the formula for calculating specular highlights (what is called the phong shading model) is as follows:

kspec = max(r • v, 0)n

Translate this to a mirror: r is the ray of the light ...

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