Baking lights in 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. In order 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 have geometries and, obviously, lights. For this recipe, we will rely on Unity's standard features so there is no need to create additional shaders or materials. We will be reusing the map that we used previously 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
| Lighting | Settings
from the menu and dock it where it is...