diff --git a/src/Debug/skeletonViewer.ts b/src/Debug/skeletonViewer.ts index 29c54f288b6..9f6c343bd8d 100644 --- a/src/Debug/skeletonViewer.ts +++ b/src/Debug/skeletonViewer.ts @@ -60,6 +60,11 @@ export class SkeletonViewer { uniform mat4 worldViewProjection; #include + #if NUM_BONE_INFLUENCERS == 0 + attribute vec4 matricesIndices; + attribute vec4 matricesWeights; + #endif + #include varying vec3 vColor; @@ -121,7 +126,7 @@ export class SkeletonViewer { fragment: 'boneWeights:' + skeleton.name }, { - attributes: ['position', 'normal'], + attributes: ['position', 'normal', 'matricesIndices', 'matricesWeights'], uniforms: [ 'world', 'worldView', 'worldViewProjection', 'view', 'projection', 'viewProjection', 'colorBase', 'colorZero', 'colorQuarter', 'colorHalf', 'colorFull', 'targetBoneIndex' @@ -195,6 +200,10 @@ export class SkeletonViewer { uniform float colorMap[` + ((skeleton.bones.length) * 4) + `]; #include + #if NUM_BONE_INFLUENCERS == 0 + attribute vec4 matricesIndices; + attribute vec4 matricesWeights; + #endif #include varying vec3 vColor; @@ -242,7 +251,7 @@ export class SkeletonViewer { ` }, { - attributes: ['position', 'normal'], + attributes: ['position', 'normal', 'matricesIndices', 'matricesWeights'], uniforms: [ 'world', 'worldView', 'worldViewProjection', 'view', 'projection', 'viewProjection', 'colorMap'