From de33ef2d1b94c1d3acc1cfa708665c99d0d0bb43 Mon Sep 17 00:00:00 2001 From: Daniel Rakos Date: Tue, 23 Apr 2019 11:36:36 +0200 Subject: Disable GI probe capturing lights with bake mode disabled The bake mode property of lights previously didn't affect GI probes. This change makes the GI probe ignore lights that have their bake mode set to disabled. --- servers/visual/visual_server_scene.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'servers/visual/visual_server_scene.cpp') diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp index c8d64fca45..efde777a6b 100644 --- a/servers/visual/visual_server_scene.cpp +++ b/servers/visual/visual_server_scene.cpp @@ -3086,6 +3086,9 @@ bool VisualServerScene::_check_gi_probe(Instance *p_gi_probe) { for (List::Element *E = p_gi_probe->scenario->directional_lights.front(); E; E = E->next()) { + if (!VSG::storage->light_get_use_gi(E->get()->base)) + continue; + InstanceGIProbeData::LightCache lc; lc.type = VSG::storage->light_get_type(E->get()->base); lc.color = VSG::storage->light_get_color(E->get()->base); @@ -3106,6 +3109,9 @@ bool VisualServerScene::_check_gi_probe(Instance *p_gi_probe) { for (Set::Element *E = probe_data->lights.front(); E; E = E->next()) { + if (!VSG::storage->light_get_use_gi(E->get()->base)) + continue; + InstanceGIProbeData::LightCache lc; lc.type = VSG::storage->light_get_type(E->get()->base); lc.color = VSG::storage->light_get_color(E->get()->base); -- cgit v1.2.3