mirror of
https://github.com/godotengine/godot.git
synced 2025-01-22 10:32:54 -05:00
Fix inconsistent lighting in GLES2
Issue was possibily being caused by duplicating a light even when that
light was not in the render_light_instances array.
(cherry picked from commit 545bf86d39
)
This commit is contained in:
parent
c9422b9c23
commit
20822ee87d
1 changed files with 2 additions and 2 deletions
|
@ -1110,8 +1110,8 @@ void RasterizerSceneGLES2::_add_geometry_with_material(RasterizerStorageGLES2::G
|
|||
|
||||
LightInstance *li = light_instance_owner.getornull(e->instance->light_instances[i]);
|
||||
|
||||
if (li->light_index >= render_light_instance_count) {
|
||||
continue; // too many
|
||||
if (li->light_index >= render_light_instance_count || render_light_instances[li->light_index] != li) {
|
||||
continue; // too many or light_index did not correspond to the light instances to be rendered
|
||||
}
|
||||
|
||||
if (copy) {
|
||||
|
|
Loading…
Reference in a new issue