Lighting Math

The total color, from a single light, is:

color =  diffuse * material_diffuse * light_diffuse
       + specular * material_specular * light_specular
       + material_ambient * light_ambient

diffuse =  surface_normal dot light_direction

specular =  (normalize(light_direction + view_direction)
             dot normal)shininess