- Home /
Sorting layer ignores 2d lights from the 2d renderer
When I set a sprite sorting layer to Foreground, it get's lit (aka fully lit, ignores any concept of lights) even though there is no light enabled at all. When I change the sorting layer back to Default, the sprite is dark again as supposed to and will be lit by 2D lights like it should.
How is it possible that the sorting layer completely changes the way a material works. The material I'm using is Universal Render Pipeline/2D/Sprite-Lit-Default which works correctly with 2d lights when I set the sorting layer to Default, but stops working when the sorting layer is set to Foreground.
So by activating a freeform light which was deactivated, all lighting suddenly started to work. That's really weird. You would think that if an object is deactivated, it does not just change half(everything in the foreground layer) of the graphics to an unlit material....
I have exactly the same issue since I updated tp 2020.0.0b9. Can you share more details on how you find a way to fix this ? Does enabling one free form light in your scene just fixed everything ? no reoccurrence ? Thx in advance
In my case it was completely fixed by setting the freeform light to active in the scene hierarchy, I'm not sure if enabling a component helps. I think it might be a glitch in the lighting system so perhaps going through the scene and activating/deactivating or deleting/undeleting lights and placing new ones helps.