summaryrefslogtreecommitdiff
path: root/servers/rendering/renderer_rd
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-01-21 10:28:50 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-01-21 10:28:50 +0100
commit23d8d4453559eb605443eb366f69fcba81b00c18 (patch)
treea02c127a94092c13707f8a0ab7aedbe0c1ebafb7 /servers/rendering/renderer_rd
parent4db3716d8d9bbc95c031818b190002602558b0f2 (diff)
parentd3c3fa32af2dc11a698334963c3f2dcab3018fc2 (diff)
Merge pull request #71776 from clayjohn/PointLight2D-indices
Stop incrementing light_count once max number of lights are reached in 2D canvas renderer
Diffstat (limited to 'servers/rendering/renderer_rd')
-rw-r--r--servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp b/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp
index 462b925134..638fe44266 100644
--- a/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp
+++ b/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp
@@ -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;
}
}