浏览代码

Skeleton: Compute a small texture dimension (#27211)

Garrett Johnson 1 年之前
父节点
当前提交
aee3a570c2
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/objects/Skeleton.js

+ 1 - 1
src/objects/Skeleton.js

@@ -168,7 +168,7 @@ class Skeleton {
 		//       64x64 pixel texture max 1024 bones * 4 pixels = (64 * 64)
 
 		let size = Math.sqrt( this.bones.length * 4 ); // 4 pixels needed for 1 matrix
-		size = MathUtils.ceilPowerOfTwo( size );
+		size = Math.ceil( size / 4 ) * 4;
 		size = Math.max( size, 4 );
 
 		const boneMatrices = new Float32Array( size * size * 4 ); // 4 floats per RGBA pixel