Each MeshInstance
, or anything else with a renderable mesh, can only be effected by 8 light sources. Where the lights are placed in the scene tree doesn't matter. Here's how you should see it. In the shader that your terrain's material uses it has a uniform array. This array contains light data and in this case has a fixed length of 8
. What Godot does is figure out what light sources in the scene should fill up this array. So no matter where you put the lights in the scene tree, each mesh will always only be able to handle up to 8 lights.
Remember when I explained how splitting the terrain into chunks allows more lights? Well that's because each mesh(the chunks) can still handle up to 8 lights. So technically I didn't change how many lights the terrain can support. " I'm terrible at explaining things. T_T "
What I suggest you do instead is whenever you place a torch, check if the current terrain chunk has more than eight torches. If so, break that chunk up into 4 smaller chunks.
It would be best to manage these chunks as quad trees.