From e2c3dfd34174e21be3e9f3488db32fcd847dfc21 Mon Sep 17 00:00:00 2001 From: Philip Rideout Date: Mon, 20 May 2019 19:23:36 -0700 Subject: [PATCH] xatlas: do not remove small faces --- third_party/xatlas/xatlas.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/xatlas/xatlas.cpp b/third_party/xatlas/xatlas.cpp index a450d473d4..9ab2f4d77a 100644 --- a/third_party/xatlas/xatlas.cpp +++ b/third_party/xatlas/xatlas.cpp @@ -7801,7 +7801,7 @@ AddMeshError::Enum AddMesh(Atlas *atlas, const MeshDecl &meshDecl) const internal::Vector3 &b = mesh->position(tri[1]); const internal::Vector3 &c = mesh->position(tri[2]); const float area = internal::length(internal::cross(b - a, c - a)) * 0.5f; - if (area <= XA_EPSILON) { + if (area <= FLT_EPSILON) { faceFlags |= internal::FaceFlags::Ignore; XA_PRINT(" Zero area face: %d, indices (%d %d %d)\n", i, tri[0], tri[1], tri[2]); }