As you may probably know, I got crazy and wrote a whole Gouraud Shader for CPU. Since then I wanted my shaders to be complete and so, using the power of GLSL and Processing these are the last two shaders one might need:
You should have Processing installed and then, all you need is to open the pde
files and run them.
- Notes from Dr. Purbenyamin's Graphics II Class — Much of the work was made based on these notes.
- Phong Shading Formula — for the Formula of course (ends to be needless of
cos
) - The Phong Model, Introduction to the Concepts of Shader, Reflection Models and BRDF from Scratch A Pixel — I used this to find the best
Ks
andn
values. - Illumination for Computer Generated Pictures — The original paper Dr. Bui Tuong Phong. Because you should always start from the origin.
- Apple Technical Report #43: Phong Shading Reformulation for Hardware Renderer Simplification — Although I ended up not using their idea, it was the most optimized way to go.