Stop incrementing light_count once max number of lights are reached in 2D canvas renderer

This commit is contained in:
clayjohn
2023-01-20 17:04:00 -08:00
parent 9f74f0f6c5
commit d3c3fa32af
2 changed files with 2 additions and 2 deletions

View File

@@ -455,7 +455,7 @@ void RendererCanvasRenderRD::_render_item(RD::DrawListID p_draw_list, RID p_rend
light_count++;
if (light_count == MAX_LIGHTS_PER_ITEM) {
if (light_count == MAX_LIGHTS_PER_ITEM - 1) {
break;
}
}