summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-08-28 15:46:58 +0200
committerGitHub <noreply@github.com>2019-08-28 15:46:58 +0200
commit4a6b445a93905a9fa86e841d9cf74b4932a3c4d0 (patch)
treece9baf69924226156fac477e508e7f84c267252d /modules
parent96ea1e6fb073a32aab2bbefb5eec12769a8435ed (diff)
parentc3c805aff8f039a1ac2c7a7179358a4ff1bd10a6 (diff)
Merge pull request #31728 from fire/improve-uvatlas
Tweak xatlas and import new version b4b5426
Diffstat (limited to 'modules')
-rw-r--r--modules/xatlas_unwrap/register_types.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/xatlas_unwrap/register_types.cpp b/modules/xatlas_unwrap/register_types.cpp
index 04911301ff..65b3cf08f5 100644
--- a/modules/xatlas_unwrap/register_types.cpp
+++ b/modules/xatlas_unwrap/register_types.cpp
@@ -59,7 +59,7 @@ bool xatlas_mesh_lightmap_unwrap_callback(float p_texel_size, const float *p_ver
xatlas::PackOptions pack_options;
pack_options.maxChartSize = 4096;
- pack_options.bruteForce = true;
+ pack_options.blockAlign = true;
pack_options.texelsPerUnit = 1.0 / p_texel_size;
xatlas::Atlas *atlas = xatlas::Create();
@@ -78,7 +78,7 @@ bool xatlas_mesh_lightmap_unwrap_callback(float p_texel_size, const float *p_ver
float h = *r_size_hint_y;
if (w == 0 || h == 0) {
- return false; //could not bake
+ return false; //could not bake because there is no area
}
const xatlas::Mesh &output = atlas->meshes[0];
@@ -106,7 +106,7 @@ bool xatlas_mesh_lightmap_unwrap_callback(float p_texel_size, const float *p_ver
*r_index_count = output.indexCount;
- //xatlas::Destroy(atlas);
+ xatlas::Destroy(atlas);
printf("Done\n");
return true;
}