O'Reilly logo

WebGL Game Development by Sumeet Arora

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Understanding the illumination/reflection model

The appearance of an object depends on the direction in which the light is reflected. This also depends on the changes in the color and intensity of light after reflection. The algorithms used to calculate the direction, intensity, and color of reflected light are called reflection models. Reflection models use the color components (ambient, diffuse, and specular) of a light source as well as the object material to calculate the color of a fragment. Although we will cover these components in depth in subsequent chapters, let us quickly get a basic understanding of how each component contributes to the final color calculation of a fragment.

The ambient component illuminates every object equally and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required