5.2 light sources
light is variously modeled as geometric rays, electromagnetic waves, or photons (quantum particles with some wave properties). regardless of how it is treated, light is electromagnetic radiant energy——electromagnetic energy that travels through space. light sources emit light, rather than scattering or absorbing it.
light sources can be represented in many different ways for rendering purposes. here we will discuss a simple light model——more complex and expressive models will be discussed in section 7.4 and chapter 8. extremely distant light sources like the sun are simplest to simulate; their light travels in a single direction that is the same throughout the scene. for this reason they are called directional lights. for rendering purposes, the directionality of such a light source is described by the light vector l, specified in world space. the vector l is always assumed to be of length 1 whenever encountered in this book. for directional lights, l is typically normalized (scaled to a length of 1) by the application to avoid the need to renormalize it during shading. the light vector l is usually defined pointing in a direction opposite to the direction the light is traveling(see figure 5.2). the reason behind this will become clear shortly.
figure 5.2. the light vector l is defined opposite to the direction the light is traveling.
5.8 gamma correction
once the pixel values have been computed, we need to display them on a monitor. in the early years of digital imaging, cathode-ray tube (CRT) monitors were almost exclusively used. CRT monitors exhibit a power law relationship between input voltage and display radiance, which turns out to nearly match the inverse of light sensitivity of the human eye [1028]. the consequence of this fortunate coincidence i sthat an encoding proportional to CRT