This is really a big step in the life of realtime graphics. No longer must we put up with dodgy Gouraud shading. We can now enjoy the full benefits of Phong shading from the comfort of our home computers. Phong shading is now just linear texture mapping, which, thanks to the likes of Michael Abrash, can be done very quickly indeed.
It just so happens that the texture map you need is a very simple one. This is a convenient
256x256 texture which you can take and use if you want. I must confess I very rudely stole this
image from Tom Hammersley's Graphics Coding Page.
I hope he doesn't mind. You may want to generate your own however. It's quite simple to get your
program to create one, or you can make various deviations to give different effects. For example,
you might try an image with rings of bright colour to give the appearence of a chrome object.
The aim is to calculate the coordinates (u,v) in terms of
V, H and L
The algorithm is a very simple one. If the phong map is 256x256 and centered then:
do this for each vertex, and then map the Phong map onto it, and there you have one nicely phong
shaded polygon.