Merge pull request #95000 from Calinou/lightmapgi-environment-fix-custom-rotation-bake

Fix LightmapGI not taking environment sky rotation into account when baking
This commit is contained in:
Rémi Verschelde 2024-08-16 10:35:13 +02:00
commit cba8e3bf3d
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 1 additions and 0 deletions

View File

@ -1072,6 +1072,7 @@ LightmapGI::BakeError LightmapGI::bake(Node *p_from_node, String p_image_data_pa
if (env.is_valid()) { if (env.is_valid()) {
environment_image = RS::get_singleton()->environment_bake_panorama(env->get_rid(), true, Size2i(128, 64)); 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; } break;