diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-07-17 11:43:28 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-07-17 11:43:28 +0200 |
commit | 5c2bc6ec962b948addedf1cebc3310946d74495c (patch) | |
tree | c218ec9f78d7a2b92918af9f446a147f655d2505 | |
parent | c2375d0b12b3bf5cb3d80c80ceee378eaea22f73 (diff) | |
parent | 14877d1f99ba0907fab3706ea6bfda02eb46feb0 (diff) | |
download | redot-engine-5c2bc6ec962b948addedf1cebc3310946d74495c.tar.gz |
Merge pull request #94236 from BlueCube3310/lightmap-pad-loop-fix
Lightmapper: Ensure the atlas is big enough to fit padded UV maps
-rw-r--r-- | modules/lightmapper_rd/lightmapper_rd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/lightmapper_rd/lightmapper_rd.cpp b/modules/lightmapper_rd/lightmapper_rd.cpp index 7ac7bd8088..0a848af998 100644 --- a/modules/lightmapper_rd/lightmapper_rd.cpp +++ b/modules/lightmapper_rd/lightmapper_rd.cpp @@ -233,7 +233,7 @@ Lightmapper::BakeError LightmapperRD::_blit_meshes_into_atlas(int p_max_texture_ MeshInstance &mi = mesh_instances.write[m_i]; Size2i s = Size2i(mi.data.albedo_on_uv2->get_width(), mi.data.albedo_on_uv2->get_height()); sizes.push_back(s); - atlas_size = atlas_size.max(s + Size2i(2, 2)); + atlas_size = atlas_size.max(s + Size2i(2, 2).maxi(p_denoiser_range)); } int max = nearest_power_of_2_templated(atlas_size.width); |