gltfpack: Adjust attribute weights for simplification

For now just use constant 0.5f; this code should ideally be rewritten
now that we can more easily skip unused attributes during actual
processing.
This commit is contained in:
Arseny Kapoulkine
2024-08-18 12:58:36 -07:00
parent 7ede99ff9e
commit 16712edc19
+1 -1
View File
@@ -557,7 +557,7 @@ static void simplifyMesh(Mesh& mesh, float threshold, bool attributes, bool aggr
const Stream* attr = getStream(mesh, cgltf_attribute_type_color);
attr = attr ? attr : getStream(mesh, cgltf_attribute_type_normal);
const float attrw[3] = {1e-2f, 1e-2f, 1e-2f};
const float attrw[3] = {0.5f, 0.5f, 0.5f};
std::vector<unsigned int> indices(mesh.indices.size());
if (attributes && attr)