Whether you're trying to make a better-looking game or you want to add interesting features, lights and effects can boost your project and help you deliver a higher quality product. Modern game engines, including Unity, use complex mathematics and physical modelling of how light from light sources interacts with objects in a Scene.
For visually realistic virtual game Scenes, the game engine must model sources of light, how light falls directly from those sources onto surfaces, and also how light then indirectly bounces from those surfaces to other objects in the scene, and again onto other objects and so on. For rich, complex Scenes containing many objects and light sources, it would be impossible to calculate everything from scratch every frame, so pre-computation needs to take place to model these light source and surface interactions.
In this chapter, we...