Let’s summarize what we learned in this chapter:
- We learned in detail what light sources, materials, and normals are, and how these elements interact to illuminate a WebGL scene.
- We covered the differences between a shading method and a lighting model.
- We studied the basics of the Goraud and Phong shading methods, along with the Lambertian and Phong lighting models. With the help of several examples, we also covered how to implement these shading and lighting models in code using ESSL, and how to communicate between the WebGL code and the ESSL code through attributes and uniforms.
- We can use the vertex shader and the fragment shader to define a lighting model for our 3D scene.
- We covered many of these operations through the lens of the latest and greatest techniques provided to us in WebGL 2's updated shading language.
In the next chapter, we will expand...