Light layers in Unity HDRP

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.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Luke Duckett

Luke Duckett

Unity developer with a love of learning all things programming.