summaryrefslogtreecommitdiffstats
path: root/scene
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2024-08-01 02:19:01 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-09-16 16:33:15 +0200
commit6595395b8baa1cb6938fad57561326b4aba8ce7e (patch)
tree3429bae6c0e29c6f50dd1beedb1c17cdf8807ecb /scene
parenta7756d530e27e17bede5f223f3f7b6c38fd9ef7c (diff)
downloadredot-engine-6595395b8baa1cb6938fad57561326b4aba8ce7e.tar.gz
Fix LightmapGI not taking environment sky rotation into account when 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 <git@melin.net> (cherry picked from commit 661cf1f3515ab53c002d2824876dd955b06e9e50)
Diffstat (limited to 'scene')
-rw-r--r--scene/3d/lightmap_gi.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/3d/lightmap_gi.cpp b/scene/3d/lightmap_gi.cpp
index bf928580e4..3f8b0dfb8e 100644
--- a/scene/3d/lightmap_gi.cpp
+++ b/scene/3d/lightmap_gi.cpp
@@ -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;