Diffuse Lighting

  • Kyle Halladay


In the last chapter we got our torus mesh rendering with perspective, but we still don’t have a great way of coloring the surface of it. We can’t take the easy way out and slap a texture on it, because we don’t have a texture and the UVs on our new mesh aren’t really appealing to look at. Instead, we’re going to do what every good shader developer does and throw some (simple) math at it to add some lighting to our mesh.

Copyright information

© Kyle Halladay 2019

Authors and Affiliations

  • Kyle Halladay
    • 1
  1. 1.BristolUK

Personalised recommendations