Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

4. Shedding Some Light > Ambient, Diffuse, and Specular Light

Ambient, Diffuse, and Specular Light

The OpenGL ES lighting simulation incorporates three distinct components of each light source: ambient light, diffuse light, and specular light. Programs separately configure the color of each component. The effect of each component of simulated light is shown in Figure 4.2. Ambient light comes from all directions and therefore illuminates all geometry equally. Programs specify the color and brightness of simulated ambient light to set the base level of background lighting in a scene. The color of the ambient light tints all geometry, so a red ambient light makes all geometric objects in a scene appear red or pink. The diffuse component of each light source is directional and lights each triangle in the scene based on the orientation of the triangle relative to the direction of the light. If the plane of a triangle is perpendicular to the direction of the light, the diffuse light directly hits the triangle and is scattered intensely, which makes the triangle appear brightly lit. If the plane of a triangle is....


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial