In the real world, we see objects because they reflect light. The illumination of an object depends on its position relative to the light source, surface orientation, and its material composition. In this chapter, we will learn how to combine these three elements in WebGL to model different illumination schemes:
Lights, Normals, and Materials
Positional Versus Directional Lights
Light sources can be positional or directional. A light source is called positional when its location will affect how the scene is lit. For instance, a lamp inside a room is a positional light source. Objects far from the lamp will receive very little light and may even appear obscure. In contrast, directional lights are lights that produce the same...