Writing ESSL Programs

Now, let's take a moment to step back and look at the big picture. ESSL allows us to implement a lighting strategy, provided that we define a shading method and a light reflection model. In this section, we will take a sphere as the object that we want to illuminate, and we will see how the selection of a lighting strategy changes the scene:

We will see two scenarios for Goraud interpolation: one with Lambertian and one with Phong reflections. We will only see one case for Phong interpolation; under Phong shading, the Lambertian reflection model is no different from a Phong reflection model where the ambient and specular components are set to 0.