1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

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.
This commit is contained in:
Daniel Rakos
2019-04-23 11:36:36 +02:00
parent 4b6327fb30
commit de33ef2d1b
13 changed files with 67 additions and 0 deletions

View File

@@ -3086,6 +3086,9 @@ bool VisualServerScene::_check_gi_probe(Instance *p_gi_probe) {
for (List<Instance *>::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<Instance *>::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);