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