The Rendering Layers feature lets you configure certain Lights to affect only specific GameObjectsThe fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info
See in Glossary.
For example, in the following illustration, Light A
affects Sphere D
, but not Sphere C
. Light B
affects Sphere C
, but not Sphere D
.
This feature has the following limitations:
This section contains information related to the impact of Rendering Layers on performance.
Keep the Rendering Layer count as small as possible. Avoid creating Rendering Layers that you don’t use in the project.
When using Rendering Layers for decals, increasing the layer count increases the required memory bandwidth and decreases the performance.
When using Rendering Layers only for Lights in the Forward Rendering PathThe technique that a render pipeline uses to render graphics. Choosing a different rendering path affects how lighting and shading are calculated. Some rendering paths are more suited to different platforms and hardware than others. More info
See in Glossary, the performance impact is insignificant.
Performance impact grows more significantly when the Rendering Layer count exceeds a multiple of 8. For example: increasing the layer count from 8 to 9 layers has a bigger relative impact than increasing the layer count from 9 to 10 layers. The same consideration applies to increasing the count from 16 to 17, from 24 to 25 and so on.