Baking lights into your scene
Rendering lighting is a very expensive process. Even with state-of-the-art GPUs, accurately calculating the light transport (which is how light bounces between surfaces) can take hours. To make this process feasible for games, real-time rendering is essential. Modern engines compromise between realism and efficiency; most of the computation is done beforehand in a process called light baking. This recipe will explain how light baking works and how you can get the most out of it.
Getting ready
Light baking requires you to have a scene ready. It should contain geometries and, obviously, lights. For this recipe, we will rely on Unity's standard features so that there is no need to create additional shaders or materials. We will be reusing the map that we used in Chapter 1, Post Processing Stack. For better control, you might want to access the Lighting window. If you don't see it, select Window | Rendering | Lighting from the menu and dock...