Let's cover an example where we implement lighting with Goraud shading:
- Open the ch03_03_goraud_phong.html file in your browser. You will see something similar to the following screenshot:
- The interface looks a little bit more elaborate than the diffuse lighting example. Let's stop here for a moment to explain these widgets:
- Light Color (light diffuse term): As mentioned at the beginning of this chapter, we can have an example where our light is not white. We have included a color selector widget here for the light color so that you can experiment with different combinations.
- Light Ambient Term: The light ambient property. In this example, this is a gray value: r = g = b.
- Light Specular Term: The light specular property. This is a gray value: r = g = b.
- Translate X,Y,Z: The coordinates that define the light's orientation.
- Sphere...