-
Lighting
-
concepts
-
surface
- smooth surface -> specular
- rough surface -> diffuse
-
light principles
- Ambient
- Specular
- Diffuse
-
user vectors
- to source (l) = light source - P
- to viewer (v) = eye - P
- perfect reflection (r) = 2(l . n)n - l
- normal vector (n)
-
Phong model
-
9 coefficient for point source
-
9 coefficient for materials
- shininess coefficient (alpha)
-
Formula
- Phong Model formula
-
Phong Lighting Model
-
glMaterialfv()
- glLightfv()
-
Modified Phong model
- Subtopic 2
-
Shading
-
Goround Shading
- find n of vertex
- colored vertex
- color interpolate
-
Phong Shading
- find n of vertex
- interpolate n vector
- colored each point