summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorclayjohn <claynjohn@gmail.com>2023-01-20 17:04:00 -0800
committerclayjohn <claynjohn@gmail.com>2023-01-20 17:04:00 -0800
commitd3c3fa32af2dc11a698334963c3f2dcab3018fc2 (patch)
treed98f164052447e39946c3a5cad35c636c29d3f44 /drivers
parent9f74f0f6c5e5c98b18f4f0ad95092a88d064f616 (diff)
Stop incrementing light_count once max number of lights are reached in 2D canvas renderer
Diffstat (limited to 'drivers')
-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;
}
}