In this chapter, we will cover the following recipes:
- Diffuse and per-vertex shading with a single point light source
- Implementing the Phong reflection model
- Using functions in shaders
- Implementing two-sided shading
- Â Implementing flat shading
- Â Using subroutines to select shader functionality
- Discarding fragments to create a perforated look