summaryrefslogtreecommitdiff
path: root/drivers/gles3
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 /drivers/gles3
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 'drivers/gles3')
-rw-r--r--drivers/gles3/rasterizer_canvas_gles3.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gles3/rasterizer_canvas_gles3.cpp b/drivers/gles3/rasterizer_canvas_gles3.cpp
index fb338b9849..89b1c1889e 100644
--- a/drivers/gles3/rasterizer_canvas_gles3.cpp
+++ b/drivers/gles3/rasterizer_canvas_gles3.cpp
@@ -803,7 +803,7 @@ void RasterizerCanvasGLES3::_record_item_commands(const Item *p_item, RID p_rend
light_count++;
- if (light_count == data.max_lights_per_item) {
+ if (light_count == data.max_lights_per_item - 1) {
break;
}
}