Flicker Lights for no reason?

Godot Version

4.2.1

Question

these lights specifically flick when player walks around them… the game is scary but why the hell this happens? there are other lights that are in the same layer, same Z index but those lights dont have the same problem.
Screenshot 2024-03-01 183416
Screenshot 2024-03-01 183457
Screenshot 2024-03-01 183524

Perhaps the occluder on the lamps has floating point values, which sometimes overlaps with the wall occluder. There was something similar, try moving the lamps farther away from the wall, when I solved a similar thing it worked for me

there arent any Occluder near that place and the shadow function is actually off.

In case you’re still having the issue, or someone else comes across this in the future, the problem is almost certainly that Godot 4 has a hard limit of 15 lights affecting each node. If more than 15 lights affect a node, the rest are just ignored and won’t render.

See Increase 2D Light cap · godotengine/godot-proposals · Discussion #9336 · GitHub

Edit: The reason this causes the flicker is because as the player moves around, various lights are moving on/off screen and are getting culled/unculled.

1 Like

yeah when i zoomed the camera more this issue stopped happening