Controlling Scene Lighting Using Light Layers In Unity HDRP
Today I will use Light Layers in Unity HDRP to improve control over scene lighting and atmosphere.
Today’s Objective: Explore the capabilities and benefits of Light Layers in Unity HDRP.
What are Light layers?
There are times in game development when you want things like lights or probes to only affect certain other things like objects or surfaces. In the case of lighting, Light Layers is one method to better control what effects lights have on their surroundings.
In the event that you set affected Light Layers to None, it is only useful when you have Volumetric Lighting enabled for the light rays. Otherwise, the light will be completely invisible.
Using Light Layers:
To use Light layers in your project, you need to enable the option on both the HDRP Asset and the Light/s itself.
The option on the light is hidden by default, so you need to enable “Show Additional Properties” for the “General” category to make it show up.
Now the light will only light up the layers that you’ve specified on the Light Layer dropdown option. When set to None (with Volumetric Lighting) it will look something like this: