This paper will describe techniques to implement the lighting algorithms for point and spot light sources at a pixel level at realtime rates using fragment program capabilities on current graphics cards.
Visual simulation has long been required to simulate point and spot light sources such as headlights, search lights, flares, and steerable landing lights. To calculate lighting at a pixel level from these sources has traditional been difficult to run at realtime rates. Today's commercial graphics cards now have the ability to do pixel lighting at realtime rates using fragment programs (pixel shaders). The complex calculations for range and angle attenuation of these lights sources can be imbedded into texture maps and "looked-up". Two or multi-pass algorithms per polygon of the past are no longer necessary.
The generation of texture coordinates and generation of the texture maps from the attenuation calculations will be described. Lighting from directional light sources (e.g., sun or moon) and illumination of fog will also be addressed.
The pixel lighting performance of current commercial graphics cards (NVIDIA/ATI) will be discussed.