You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 13:00:37 +00:00
Avoid calculating dynamic lights when lights are baked into LightmapGI using the static bake mode
This commit is contained in:
@@ -2211,6 +2211,10 @@ void fragment_shader(in SceneData scene_data) {
|
||||
continue; //not masked
|
||||
}
|
||||
|
||||
if (directional_lights.data[i].bake_mode == LIGHT_BAKE_STATIC && bool(instances.data[instance_index].flags & INSTANCE_FLAGS_USE_LIGHTMAP)) {
|
||||
continue; // Statically baked light and object uses lightmap, skip
|
||||
}
|
||||
|
||||
#ifdef LIGHT_TRANSMITTANCE_USED
|
||||
float transmittance_z = transmittance_depth;
|
||||
#ifndef SHADOWS_DISABLED
|
||||
|
||||
Reference in New Issue
Block a user