I think I found a Godot bug

Godot Version

4.5.stable and 4.5.1.stable

Question

I made multiple PointLight2Ds, and I was duplicating them and placing them where I wanted, but then eventually the new ones stopped showing if I was too zoomed out. The weird thing is if I zoomed in I could see them, but if I was just a little too zoomed out they’d disappear. In my testing it seems every light over 15 starts to disappear.

How to recreate:

  • Make a new scene with Node2D as root.
  • Add a sprite as the background so the lights show.
  • Create a PointLight2D and give it a texture. (I’ve tested with two different textures)
  • Repeat at least 20 times: Control + D the PointLight2D and move it so it’s not overlapping another light, but still on the background so it’s visible.
  • Make sure your zoom is less then 80%
  • Now every light after the 15th should be invisible unless you zoom in on them.

And yes, I have restarted Godot, restarted my device, and downloaded the new Godot update but it still remains.

It’s not a bug. It’s a limit. Although it may not seem so, the number of lights your computer can handle is not unlimited. This is true for every other thing in a computer, not just lights :smiley:

2 Likes

The limitations for lights is mentioned in the docs, but only in the section for 3D. This feels like a bit of an oversight? Might be worth raising as an document issue on GitHub?

1 Like

Yes it should be included here:

2 Likes

I’ve raised an issue :+1: "2D lights and shadows" page should have a section about light limits · Issue #11382 · godotengine/godot-docs · GitHub

3 Likes

Thanks for the help.
I just found this video that solves my problem: https://youtu.be/qmwxsL9P05E

1 Like