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
commit 23d8d44535
No known key found for this signature in database
GPG key ID: C3336907360768E1
2 changed files with 2 additions and 2 deletions

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;
}
}

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;
}
}