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

Disable lights for objects with baked lighting

Don't apply lighting to objects when they have a lightmap texture and
the light is set to BAKE_ALL. This prevents applying the same direct
light twice on the same object and makes setting up scenes with mixed
lighting much easier.
This commit is contained in:
JFonS
2020-08-30 20:16:24 +02:00
parent 18fc857b9f
commit fcb00ca048
15 changed files with 87 additions and 18 deletions

View File

@@ -3120,7 +3120,7 @@ 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))
if (VSG::storage->light_get_bake_mode(E->get()->base) == VS::LightBakeMode::LIGHT_BAKE_DISABLED)
continue;
InstanceGIProbeData::LightCache lc;
@@ -3143,7 +3143,7 @@ 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))
if (VSG::storage->light_get_bake_mode(E->get()->base) == VS::LightBakeMode::LIGHT_BAKE_DISABLED)
continue;
InstanceGIProbeData::LightCache lc;