"As I would not be a slave, so I would not be a master. This expresses my idea of democracy."
- Abraham Lincoln

Framework 4 (Last updated: October 25, 2019)
Framework 3 (Last updated: February 6, 2017)
Framework 2 (Last updated: October 8, 2006)
Framework (Last updated: October 8, 2006)
Libraries (Last updated: September 16, 2004)
Really old framework (Last updated: September 16, 2004)
Phong
Friday, November 8, 2002 | Permalink

Executable
Source code
Phong.zip (492 KB)

Required:
GL_ARB_fragment_program
I have implemented a slightly simplified version of the phong lighting model. The lighting equation is evaluated completely in a fragment program. Gone is normalizing cubemaps, 3d texture attenuation and vectorfields and vertex interpolated halfvectors as have been the standard for perpixel lighting on last generation hardware. However, while pushing all this work onto the fragment program gives you much better quality it does also slow things down significantly. Accessing a texture it still much faster than evaluating reciprocals and reciprocal square roots. If you wanted an app for bringing your Radeon 9700 down on it's knees, this demo is what you want , expect around 50fps in 1024x768.

Will run on Radeon 9500/9700 only at this time.

2002-11-09:
Updated to support both Blinn and Phong models. Type "blinn" or "phong" on the console to change between the different illumination models, default is Phong. Fixed a small mistake with ambient too.