2D lighting is in the wrong position in Game Mode

I have been working on a 2D platformer game that relies on URP’s 2D lighting system. I just upgraded my Unity to 2021.1 today and for some reason, all the point light components seem to be giving light in the wrong positions in Game Mode. However, they work perfectly fine in Scene View. To give an example:

The orange light from the portal is at the bottom of the screen when it should have been right on the portal.

The correct version in Scene View looks like this:

See how the light is actually originating from the portal?
Did anyone else found that their 2D lights are acting weird since the last update? Do you know why this might be happening?

Thanks a lot! :smile:

Hi
i have same problem…

Same

Same problem as well

Same here. Ended up checking “Post Processing” on the main camera, then it worked.

I change Render Scale from 1 to this 1.06 or more and its working now…

Hi,
I have the same problem. The problem is only when you use a Camera Stack. With other camera the lights works well.
The problem is not only the position but olso the rotation, if you use only spot light you can think that is only the position but try also to use “freeform”.

someone help me please :slight_smile:

Unity 2021.2.0b10 URP 12

2 Likes

Dear All,

I tried to create the bug with version 2021.2.0f1 in an empty project:

  • 1 main camera
  • 1 camera stack
  • 1 sprite
  • 1 light 2d

and you got the problem

with the new release 2022.1.0a13 the problem with camera stack and light 2D is fixed also I tried upgrading my project and all works fine (all… I need to test evrythink but the light works :slight_smile: )

I have the same problem in Unity 2021.2.8f1. I have a 2d spot light attached to my player, I just updated for 2021.1.11f1 in which the 2d lights were working fine. The 2D spot and sprite lights in the 2021.2.8f1 version are correct in the editor scene view when not playing . As soon as I click play the 2d lights seem to always be in the correct x position but are placed and move incorrectly on the Y axis this also happens when I build the project.

It is really strange, I observe the transform positions of the child 2d spot lights and sprite lights and the position, rotations and scales do not change yet the child seems to be in completely different y positions than its parent. I’m going back to using 2021.1.11f1 until this is fixed.

1 Like

this one helped me too, thnx a lot

Unfortunately still happening in version 2021.3.4f1 when I use the camera stack!

Some matrix manipulation goes wrong in the background I guess?

in the below (crappy quality) video you can see the light jump when I enable the camera stack

The same issue is still present in Unity 2021.3.7f1 LTS. That is pretty bad for an LTS version, the last known working version for me is 2021.1.28f1, all versions after this have the bug with URP, camera stacks and 2d lights. I’m just about to see if it is fixed in 2022.1.12f1, hopefully it is as this is a major set back for my game on all platforms.

1 Like

Please keep us posted !
I have the same issue and dont know which version I should aim for :confused:

1 Like

Same issue, still today. This is really bad for an LTS version. Please devs give us an update on what’s going on, it’s a very crucial thing. All I can find is an issue tracker marked “Solved” in URP 13.1 but we shouldn’t need to update so many versions for this.

2 Likes

Ran into this problem today when attempting a camera stack for the first time. Quite frustrated and disappointed. Unity version 2021.3.16

Will look into this this week. I didn’t realize this fix hadn’t been backported.

1 Like

Try this again with 2021.3.18. This seems to be working for me.

Same problem with me, the only solution then is to change the version of unity? Currently my project is on version 2021.3.16f1

We can only fix bugs in new releases, so at the very least you need to install 2021.3.18. However, its likely that you could still use 2021.3.16 as the 2D URP code should be compatible. But I’d recommend using 2021.3.18 as there might be other bug fixes.