Writing ESSL programs

Let's now take a step back and take a 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.

Writing ESSL programs

We will see two scenarios for Goraud interpolation: with Lambertian and with Phong reflections; and only 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 zero. ...

Get WebGL Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.