Tutorial: Lighting Calculations

Exercises

In this tutorial:

  1. Use a diffuse shader to apply lighting to geometry
  2. Add Blinn-Phong specular highlights to the shader
  3. Implement Blinn-Phong lighting per-pixel
  4. Convert both Blinn-Phong shaders to calculate Phong lighting

1: The diffuse shader

2: Add the specular highlights to the lighting shader

diffuse and diffuse with specular

3: Per-Pixel shading

4: Phong lighting

Resources