Skip to content

Commit

Permalink
Fix LightmapGI not taking environment sky rotation into account when …
Browse files Browse the repository at this point in the history
…baking

The sky rotation now affects the baked environment lighting as it should,
making it match how real-time ambient light rendering works.

Co-authored-by: Per Melin <[email protected]>
  • Loading branch information
Calinou and permelin committed Aug 5, 2024
1 parent 3978628 commit 661cf1f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scene/3d/lightmap_gi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1072,6 +1072,7 @@ LightmapGI::BakeError LightmapGI::bake(Node *p_from_node, String p_image_data_pa

if (env.is_valid()) {
environment_image = RS::get_singleton()->environment_bake_panorama(env->get_rid(), true, Size2i(128, 64));
environment_transform = Basis::from_euler(env->get_sky_rotation()).inverse();
}
}
} break;
Expand Down

0 comments on commit 661cf1f

Please sign in to comment.