Exam 1 is Wednesday. We will review on Monday. See review sheet
Lab:
Phong Lighting
How do Normals transform? When do we need to be careful?
The halfway vector, H, is used to approximate the specular product V dot R. You can read about the halfway vector.
In WebGL
Recall: Shaders in the Rendering Pipeline:
Look at Lab 5 code to see how this is all done.
Setting the light position takes thought:
Normal vectors do not generally transform the
same way that vertices transform. When do we need to be careful?
Setting Up Shaders in Application - see Lab 5 code
Shader Language (GLSL)