From 8b3db6e9cee2cf602540476b4d2d3cd5094a4ce8 Mon Sep 17 00:00:00 2001 From: clayjohn Date: Mon, 16 Jan 2023 13:05:52 -0800 Subject: Properly initialize directional_light_count in RD sky shaders --- servers/rendering/renderer_rd/environment/sky.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'servers/rendering') diff --git a/servers/rendering/renderer_rd/environment/sky.cpp b/servers/rendering/renderer_rd/environment/sky.cpp index 863e8d6c15..7e02f98ce9 100644 --- a/servers/rendering/renderer_rd/environment/sky.cpp +++ b/servers/rendering/renderer_rd/environment/sky.cpp @@ -1085,8 +1085,8 @@ void SkyRD::setup_sky(RID p_env, Ref p_render_buffers, con sky->reflection.dirty = true; } + sky_scene_state.ubo.directional_light_count = 0; if (shader_data->uses_light) { - sky_scene_state.ubo.directional_light_count = 0; // Run through the list of lights in the scene and pick out the Directional Lights. // This can't be done in RenderSceneRenderRD::_setup lights because that needs to be called // after the depth prepass, but this runs before the depth prepass -- cgit v1.2.3