Skip to content

Commit f078704

Browse files
authored
Merge pull request KhronosGroup#547 from stevk/skinBfix
Undo instancing of skins with skinB
2 parents 94427e0 + 73b7638 commit f078704

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

Output/Positive/Animation_Skin/Animation_Skin_07.gltf

+8-1
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@
286286
"name": "joint1"
287287
},
288288
{
289-
"skin": 0,
289+
"skin": 1,
290290
"mesh": 1,
291291
"name": "outerPrism"
292292
}
@@ -302,6 +302,13 @@
302302
}
303303
],
304304
"skins": [
305+
{
306+
"inverseBindMatrices": 4,
307+
"joints": [
308+
1,
309+
2
310+
]
311+
},
305312
{
306313
"inverseBindMatrices": 4,
307314
"joints": [

Source/ModelGroup_SkinB.cs

+8-3
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,12 @@ protected static partial class Nodes
4949
invertedJoint0,
5050
invertedJoint1
5151
};
52-
var skin = new Runtime.Skin
52+
var innerSkin = new Runtime.Skin
53+
{
54+
Joints = jointsList,
55+
InverseBindMatrices = inverseBindMatricesList
56+
};
57+
var outerSkin = new Runtime.Skin
5358
{
5459
Joints = jointsList,
5560
InverseBindMatrices = inverseBindMatricesList
@@ -58,14 +63,14 @@ protected static partial class Nodes
5863
var nodeInnerPrism = new Runtime.Node
5964
{
6065
Name = "innerPrism",
61-
Skin = skin,
66+
Skin = innerSkin,
6267
Mesh = Mesh.CreatePrism(colorInner),
6368
};
6469

6570
var nodeOuterPrism = new Runtime.Node
6671
{
6772
Name = "outerPrism",
68-
Skin = skin,
73+
Skin = outerSkin,
6974
Mesh = Mesh.CreatePrism(colorOuter, Scale: new Vector3(1.6f, 1.6f, 0.3f)),
7075
};
7176

0 commit comments

Comments
 (0)