[1328012, Fixed 2021.1.0a10^] Invisible 2D light when specific condition

6969995--821618--Lighting bug in Experimental 2D renderer.gif

I just found some weird behavior of 2D light, it’s also not visible in runtime.

I haven’t yet found a way to try to reproduce this, but if I do find it, I will write about how to reproduce of this bug in this thread.

Has anyone ever had an experience like this?

6973475--822278--is this culling bug.gif

I just found this behavior, I’m not sure but is this LOD or culling bug?
Also I discovered about this only happen not visible of Volume Opacity-visible part, so light shading of sprites are fine.

6973544--822305--is this culling bug 2.gif

Okay, maybe did I just made broken Volume Opacity…?

6975959--822713--is this culling bug 3.gif

This is must be culling bug, if anyone want to visible light that uses Volume Opacity but not visible, use this trick to force visible them.

  • Add invisible lights (intensity must do 0)
  • You can use any type of 2D light (I highly recommend to use sprite light without sprite)
  • Move to visible area of invisible Volume Opacity light
  • They will appear!
  • Still can’t reproduce in blank project :confused:

I can’t reproduce in vanilla way, so I report it with Unity bug report.
I will add bug tracker URL when it’ll available.

I got a response about it, it says this issue has been fixed in 11.0.0.

“The issue seems to be when using two 2D Lights where one of them has 2 Target Sorting Layers checked and another one has only one of the same Layer checked and when that light with one Layer checked is out of view the light with 2 Layers checked gets culled.”
“There’s also an issue that if 2D Light has two Targeting Sorting Layers enabled that are in a row in the list (like 1st and 2nd Layers) the 2D Light will be culled no matter what.”

So they requested to developers for this issue to be backported to Unity 2020.3.

Issue tracker : Unity Issue Tracker - [URP] 2D Light gets culled when one light is using 2 Target Sorting Layers and another offscreen light is using one same layer

1 Like