Search Issue Tracker

Fixed

Fixed in 2022.3.21f1, 2023.2.11f1, 2023.3.0b8

Votes

7

Found in

2022.3.4f1

2023.1.3f1

2023.2.0a22

2023.3.0a3

Issue ID

UUM-41683

Regression

No

[URP] Light culling mask does not work when using Forward+ Rendering Path

--

-

Reproduction steps:
1. Open project “IN-45840.zip”
2. Open “SampleScene”
3. Select “URP-HighFidelity-Renderer.asset” in the project and change “Rendering\Rendering Path” to “Forward+” through the Inspector

Expected result: The “Point Light” does not affect the “Cube” GameObject”
Actual result: The “Point Light” affects the “Cube” GameObject” (might need to disable “Directional Light” to see it) - the light culling mask does not work

Reproducible with: 2022.3.4f1, 2023.1.3f1, 2023.2.0a22
Couldn’t test with: 2021.3.28f1 (no Forward+ Rendering Path)

Reproducible on: macOS Ventura 13.2.1 (Intel), Windows 10 (by the reporter)

Notes:
- Also reproducible in Standalone Player
- The issue does not reproduce with the “Forward” Rendering Path

Comments (4)

  1. Apoorva_Joshi

    Feb 15, 2024 12:48

    Hi, thank you for reporting and voting on this. This is more of a UX and documentation fail rather than a technical limitation, and I'm working on improving these aspects.

    Longer explanation:

    The culling mask is an old feature. Lots of customers didn't like light.cullingMask because it checks against the layer of the mesh renderer's gameobject. This is problematic because the layer also controls other aspects, such as physics. So it's annoying to couple lighting and physics in this way. Another limitation is that a gameobject can only be on one layer at a time.

    The newer iteration of the same features is called Rendering Layers. The way it works is that you turn on the Lighting -> Use Rendering Layers setting on the URP asset. Then you set the Rendering Layers on the Light. Finally, you set the Additional Settings -> Rendering Layer Mask on the Mesh Renderer. This decouples the lighting from the gameobject layers and other Unity systems. A mesh renderer can also be on multiple rendering layers at the same time, so you can also achieve more complex lighting scenarios this way.

    Rendering Layers are more powerful than the culling mask, and work across Forward, Forward+ and Deferred. In my opinion, you should always use Rendering Layers instead of the Culling Mask, which we cannot remove because of backward compatibility.

    The feature is currently not exposed in UI in the best way possible, and has led to confusion. I'm fixing this in 2023.3, 2023.2, and 2022.3, with better tooltips, warnings, inspectors, and docs.

  2. EpicVR-

    Feb 07, 2024 19:08

    I encountered this issue in 2022.3.16f1 and 2022.3.18f1. I don't understand how the fix for the 2022 version is only "Under Consideration", as this LTS version was promoted with Forward+ Rendering as one of most important features.

    This has to be fixed for the 2022 version as well...

  3. terryYang

    Nov 09, 2023 18:59

    This seems to be a bug that is easily fixed, but strangely it is not fixed in the latest version(2022.3.13f1).

  4. EP-Toushirou

    Oct 30, 2023 08:32

    Hello, could you please write this issue on the 'Known Issues' in the 'Release Notes'?

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.