mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-13 06:20:01 -05:00
fix sparse blendShape position accessor min and max
This commit is contained in:
@@ -48,6 +48,8 @@ namespace UniGLTF
|
||||
positionAccessorIndex = data.ExtendSparseBufferAndGetAccessorIndex(accessorCount,
|
||||
sparseIndices.Select(x => positions[x]).ToArray(), sparseIndices, sparseIndicesViewIndex,
|
||||
glBufferTarget.NONE);
|
||||
data.Gltf.accessors[positionAccessorIndex].min = positions.Aggregate(positions[0], (a, b) => new Vector3(Mathf.Min(a.x, b.x), Math.Min(a.y, b.y), Mathf.Min(a.z, b.z))).ToArray();
|
||||
data.Gltf.accessors[positionAccessorIndex].max = positions.Aggregate(positions[0], (a, b) => new Vector3(Mathf.Max(a.x, b.x), Math.Max(a.y, b.y), Mathf.Max(a.z, b.z))).ToArray();
|
||||
}
|
||||
|
||||
// normals
|
||||
|
||||
Reference in New Issue
Block a user