Merge pull request #43858 from JFonS/fix_baked_lights_gles2

[3.2] Fix regression in baked lights when using GLES2
This commit is contained in:
Rémi Verschelde 2020-11-25 23:11:38 +01:00 committed by GitHub
commit 17eb869231
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -2300,7 +2300,7 @@ void RasterizerSceneGLES2::_render_render_list(RenderList::Element **p_elements,
if (!unshaded && e->light_index < RenderList::MAX_LIGHTS) { if (!unshaded && e->light_index < RenderList::MAX_LIGHTS) {
light = render_light_instances[e->light_index]; light = render_light_instances[e->light_index];
if (e->light_mode == LightMode::LIGHTMODE_LIGHTMAP && light->light_ptr->bake_mode == VS::LIGHT_BAKE_ALL) { if (e->instance->baked_light && light->light_ptr->bake_mode == VS::LIGHT_BAKE_ALL) {
light = NULL; // Don't use this light, it is already included in the lightmap light = NULL; // Don't use this light, it is already included in the lightmap
} }
} }