ABSTRACT

Lighting or illumination refers to the technique that handles the interaction between lights and objects. This chapter presents a widely-used lighting model named the Phong model and shows how the shaders are programmed for it. It discusses the problems of the Phong model and introduces significantly different lighting models, ray tracing and radiosity. For lighting computation, it is necessary to specify the light sources. A simple light source is the point light. Located at a point in space, it emits light uniformly in all directions. The light source is called directional. It is assumed that, unlike the point light, the directional light is not attenuated over distance. The only factors to be considered are the light's direction and color. This chapter presents lighting with a directional light. For rendering a surface illuminated by a light source, we need to measure the irradiance (incoming light) at the surface and the outgoing radiance reaching the camera.