Merge pull request #71776 from clayjohn/PointLight2D-indices

Stop incrementing light_count once max number of lights are reached in 2D canvas renderer
This commit is contained in:
Rémi Verschelde
2023-01-21 10:28:50 +01:00
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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;
}
}
@@ -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;
}
}