summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorBlueCube3310 <53150244+BlueCube3310@users.noreply.github.com>2024-07-11 23:16:31 +0200
committerBlueCube3310 <53150244+BlueCube3310@users.noreply.github.com>2024-07-11 23:16:31 +0200
commit14877d1f99ba0907fab3706ea6bfda02eb46feb0 (patch)
treecf408ec70263ac5a1749fe03383fcb808f0850ba /modules
parent26d1577f3985363faab48a65e9a0d9eed0e26d86 (diff)
downloadredot-engine-14877d1f99ba0907fab3706ea6bfda02eb46feb0.tar.gz
Lightmapper: Ensure the atlas is big enough to fit padded UV maps
Diffstat (limited to 'modules')
-rw-r--r--modules/lightmapper_rd/lightmapper_rd.cpp2
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);