From c3c805aff8f039a1ac2c7a7179358a4ff1bd10a6 Mon Sep 17 00:00:00 2001 From: "K. S. Ernest Lee" Date: Tue, 27 Aug 2019 18:12:21 -0700 Subject: Tweak xatlas and import new version b4b5426 * Avoid xatlas crash * Enable alignment and disable bruteforce for speedups * Update xatlas to b4b5426 * Delete old patches --- modules/xatlas_unwrap/register_types.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules') 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; } -- cgit v1.2.3