You've already forked godot
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user