Cameras, Lighting, and Visual Effects
Whether you’re trying to make a better-looking game or you want to add interesting features, visual effects can add enjoyment and a more professional look and feel to many games:
Figure 13.1: Multiple light sources in Coco VR by Pixar and Magnopus (featured on the Unity website Made with Unity)
At the end of the day, what we can see is the color properties of the rectangular array of pixels (picture elements) that make up the screen (or screens, for VR) that we are looking at. The Unity game engine must use the GameObjects in a scene and their properties to decide what to render (draw) in the Game window. Some GameObjects model 3D objects, with properties relating to physical materials, and renderer components for configuring how they should be displayed. Other GameObjects simulate light sources.
Modern computers with powerful CPUs and GPUs are beginning to support real-time raytracing. Raytracing involves calculating...