Light layers in Unity HDRP

Luke Duckett
2 min readJan 18, 2022

--

In this article, I will go over how to add light layers in the Unity High Definition Render Pipeline.

Light layers are a way of setting light sources to only affect specific objects in Unity, for example you can set a light on a layer and set it to effect your bug enemies only this could be great when set up with a simulated black light. This can greatly increase optimisation in your project.

The first step is to enable your light layers. In yout Project tab go to your “DefaultHDRPAsset” and under the “Lighting” dropdown check the “Light Layers” checkbox.

Next we want to set up a light layer, on your light source click the “More Options Button” (which looks like a gear icon) which will give you the light layer drop down. Select a layer to use, keeping in mind that you my have to deselect previous layers.

Now in your scene you should notice some changes with your game object.

If you wish to add objects to a light layer you can adjust this on their Mesh Renderer” component under the “Rendering Laymask Setting”.

That’s all for now.

--

--

Luke Duckett

🎮 First Nations Unity Dev from Wonnarua country 🏞️ | From Player to Lifelong Learner: Crafting Games, Debugging Code, and Embracing New Technology