# Deferred Lighting [This video](https://www.youtube.com/watch?v=By7qcgaqGI4) by Jasper goes into a ton of detail about the different stages in the shading pipeline as backstory to explain why a small graphical glitch in a Zelda game happens. Showing how 2 seemingly simple images can be used to generate deferred lighting was pretty eye opening. The possibilities are really dramatic. Then, how Zelda has 9 dedicated rendering pipelines for different materialls that are kicked off by another "image" called the [Material Mask Buffer](https://youtu.be/By7qcgaqGI4?t=1464) is another really powerful technique. It splits the world up into: terrain, foliage, water, skin, hair, eyes, clothes/fur, metal, rubber. It allows the renderer to cell shade the characters and objects but leave the world design more realistic. During another section of the same video he talks about Valve's VRAD lighting engine developed for Half-Life 2. One of the things that blew my mind there was that a lot of the areas, like [the caves](https://youtu.be/By7qcgaqGI4?t=611) just use a single repeating texture, yet manage to look complex and detailed entirely due to how lighting is rendered on top of the base textures. Jasper compares this strategy to cell shaded games like Borderlands and argues that lighting is the most important part of any game's visuals regardless of style.