Skip to content

Commit

Permalink
feature: add VRMUtils.removeUnnecessaryVertices
Browse files Browse the repository at this point in the history
To address the issue that morph textures consumes gigantic amount of VRAM
See: mrdoob/three.js#23095
  • Loading branch information
mrxz committed Apr 18, 2022
1 parent 018beea commit 966fb12
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export function removeUnnecessaryVertices(root: THREE.Object3D): void {
newGeometry.name = geometry.name;

newGeometry.morphTargetsRelative = geometry.morphTargetsRelative;

//newGeometry.setDrawRange(geometry.drawRange.start, geometry.drawRange.count);
geometry.groups.forEach((group) => {
newGeometry.addGroup(group.start, group.count, group.materialIndex);
});
Expand Down

0 comments on commit 966fb12

Please sign in to comment.