Status – Week 277. Victor Moya. Lightning. Diffuse Lightning. Light Sources. Specular Lightning. Emission. Gouraud Shading. Phong Shading. Bump Mapping. OpenGL Lightning. Light Sources. Ambient Light. Directional Light Sources Infinite light source (parallel rays). No attenuation.
Kc, Kl and Kq are constant, linear and quadratic attenuation values.
U: Direction of the spot light.
L: Unit direction vector from surface point to light spot.
A: Ambient light
T: Texture sample.
D: Surface diffuse reflection color.
Ci: Intensity of the i light at the surface point.
N: Normal vector of the surface.
Li: Unit direction vector to the light source I.
S: Surface specular color.
Ci: Intensity of the incident light.
m: specular exponent (larger, sharper hightlight).
G: Gloss map sample.
N: Normal vector at the surface.
L: Unit direction to light vector.
Hi: Halfway vector (V + L).
V: Unit direction to viewer vector.
Kemission = EM
E: Surface emission color.
M: Emission map sample.
K = Kprimary * T1 * T2 * ... * Tk + Ksecondary
Ti : Color samples for one of k texture maps.
* : One of several available texture combination operations
K = Kemission + Kdiffuse + Kspecular