Browse Source

Properly exclude lights that are marked as sky only

clayjohn 3 years ago
parent
commit
a38c3a763a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      servers/rendering/renderer_rd/renderer_scene_render_rd.cpp

+ 1 - 1
servers/rendering/renderer_rd/renderer_scene_render_rd.cpp

@@ -3286,7 +3286,7 @@ void RendererSceneRenderRD::_setup_lights(const PagedArray<RID> &p_lights, const
 		RS::LightType type = storage->light_get_type(base);
 		switch (type) {
 			case RS::LIGHT_DIRECTIONAL: {
-				if (r_directional_light_count >= cluster.max_directional_lights) {
+				if (r_directional_light_count >= cluster.max_directional_lights || storage->light_directional_is_sky_only(base)) {
 					continue;
 				}