diff options
author | K. S. Ernest Lee <ernest.lee@chibifire.com> | 2019-08-27 18:12:21 -0700 |
---|---|---|
committer | K. S. Ernest Lee <ernest.lee@chibifire.com> | 2019-08-28 01:12:56 -0700 |
commit | c3c805aff8f039a1ac2c7a7179358a4ff1bd10a6 (patch) | |
tree | 8064dd0a958f4244b9863fc00556583b6afc0d4d /modules | |
parent | c59da91aad4c73c68e5e2884674f5fb3c3340751 (diff) |
Tweak xatlas and import new version b4b5426
* Avoid xatlas crash
* Enable alignment and disable bruteforce for speedups
* Update xatlas to b4b5426
* Delete old patches
Diffstat (limited to 'modules')
-rw-r--r-- | modules/xatlas_unwrap/register_types.cpp | 6 |
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; } |