Merge pull request #30570 from SonerSound/gles2_inconsistent_fix

Fix inconsistent lighting in GLES2
This commit is contained in:
Rémi Verschelde 2019-07-17 09:56:44 +02:00 committed by GitHub
commit 1d13567345
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1133,8 +1133,8 @@ void RasterizerSceneGLES2::_add_geometry_with_material(RasterizerStorageGLES2::G
LightInstance *li = light_instance_owner.getornull(e->instance->light_instances[i]); LightInstance *li = light_instance_owner.getornull(e->instance->light_instances[i]);
if (li->light_index >= render_light_instance_count) { if (li->light_index >= render_light_instance_count || render_light_instances[li->light_index] != li) {
continue; // too many continue; // too many or light_index did not correspond to the light instances to be rendered
} }
if (copy) { if (copy) {