Understanding shadows

As indicated earlier in this chapter, our game scenes can have numerous light sources, and we can enable or disable an object's ability to cast or receive shadows. We have shadows in the real world and it is important to consider, for our Unity games, what objects cast shadows and what objects receive shadows. 

The following screenshot shows the Mesh Renderer component of an object in the Inspector panel. Let's review the key settings of this component:

  • Light Probes: It can be set to Blend Probes, Use Proxy Volume, or Off. You will most likely use the default Blend Probes for simple Unity games.
  • Reflection Probes: This setting can be turned off or set to Blend Probes, Blend Probes And Skybox, or Simple
  • Cast Shadows: This setting can be set to On, Off, Two-Sided, or Shadows Only. The default is On, so you should disable this for all objects that do not need to cast shadows. 
  • Receive Shadows: This setting is a toggle that tells Unity whether you want that object to receive shadows or not. As you would expect, this takes extra processing to display during the game. So, if you do not need an object to receive shadows, deselect this for greater performance.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset