Control Your Lighting in Unity Using Light Layers

Renato Figueiredo
2 min readMar 19, 2024

--

Objective: Learn about Light Layers in Unity.

So lets start with the basics, what are Light Layers ? They are a feature that allows to control the interaction of lights with specific sets of objects in the scene.

This can be used in many ways, you can isolate lights, creating different layers to how each light interacts with the environment, and apply multiple layers to objects, allowing the lights to affect only those of certain layer, and ignoring the non-layered objects.

We can easily customize lighting, as the layers only apply to specific objects, it allows us to customize the lighting to specific situations, such as a specific light for indoor and outdoor for example.

Since they only affect certain items and not everything in the scene, it greatly improves performance, as there won’t be unnecessary calculations being run all the time.

And lastly, when you have multiple light effects in a scene, since each light will interact individually with its own layers, you can have multiple light sources, without negatively impacting other objects or parts of the scene.

Light Layers being used.

As we can see in the image above, since the Spotlight was being used against objects that were not in the assigned layer, the light didn’t actually illuminated anything. The system works!

--

--