summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-09-14 19:06:19 +0200
committerGitHub <noreply@github.com>2022-09-14 19:06:19 +0200
commit957aa79ce03f3918867a4fba750744fab94e0cf9 (patch)
treeadf6054b63bc4a29857347a1cd22dc6539575dcf /servers
parentf70959663112b5793463abbc20725ecf5d1dd7dd (diff)
parent72d899702bc611c9ab32644032fca54ce7bde935 (diff)
Merge pull request #65789 from clayjohn/sky-update-bug
Clear last frame directional light buffer when number of lights changes.
Diffstat (limited to 'servers')
-rw-r--r--servers/rendering/renderer_rd/environment/sky.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/servers/rendering/renderer_rd/environment/sky.cpp b/servers/rendering/renderer_rd/environment/sky.cpp
index ceba43ae8f..307af99e91 100644
--- a/servers/rendering/renderer_rd/environment/sky.cpp
+++ b/servers/rendering/renderer_rd/environment/sky.cpp
@@ -1261,6 +1261,7 @@ void SkyRD::setup(RID p_env, Ref<RenderSceneBuffersRD> p_render_buffers, const P
light_data_dirty = true;
for (uint32_t i = sky_scene_state.ubo.directional_light_count; i < sky_scene_state.max_directional_lights; i++) {
sky_scene_state.directional_lights[i].enabled = false;
+ sky_scene_state.last_frame_directional_lights[i].enabled = false;
}
}