summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorclayjohn <claynjohn@gmail.com>2022-09-14 08:30:35 -0700
committerclayjohn <claynjohn@gmail.com>2022-09-14 08:30:35 -0700
commit72d899702bc611c9ab32644032fca54ce7bde935 (patch)
tree63129aa737b049ae9fc75bdeccff0760849af3db /drivers
parentbf271ea6af5e4e1dbf12a5428445f0efa54f8651 (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 'drivers')
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp
index dae26b1e5f..1952efff0e 100644
--- a/drivers/gles3/rasterizer_scene_gles3.cpp
+++ b/drivers/gles3/rasterizer_scene_gles3.cpp
@@ -683,6 +683,7 @@ void RasterizerSceneGLES3::_setup_sky(const RenderDataGLES3 *p_render_data, cons
light_data_dirty = true;
for (uint32_t i = sky_globals.directional_light_count; i < sky_globals.max_directional_lights; i++) {
sky_globals.directional_lights[i].enabled = false;
+ sky_globals.last_frame_directional_lights[i].enabled = false;
}
}