diff options
author | clayjohn <claynjohn@gmail.com> | 2022-09-14 08:30:35 -0700 |
---|---|---|
committer | clayjohn <claynjohn@gmail.com> | 2022-09-14 08:30:35 -0700 |
commit | 72d899702bc611c9ab32644032fca54ce7bde935 (patch) | |
tree | 63129aa737b049ae9fc75bdeccff0760849af3db /servers/rendering/renderer_rd/environment | |
parent | bf271ea6af5e4e1dbf12a5428445f0efa54f8651 (diff) |
Clear last frame directional light buffer when number of lights changes.
This ensures that the buffers don't go out of sync.
Diffstat (limited to 'servers/rendering/renderer_rd/environment')
-rw-r--r-- | servers/rendering/renderer_rd/environment/sky.cpp | 1 |
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; } } |