Skip to content

Commit

Permalink
Update DualQuaternionSkinner.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
MadCake committed May 4, 2020
1 parent 3d90497 commit 5650428
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions Code/DQ skinning/DualQuaternionSkinner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -347,15 +347,13 @@ void GrabMeshFromSkinnedMeshRenderer()
this.arrBufMorphDeltas[i].SetData(deltaVertInfos);
}

this.mr.materials = new Material[this.smr.materials.Length];
for (int i = 0; i < this.mr.materials.Length; i++)
Material[] materials = new Material[this.smr.materials.Length];
for (int i = 0; i < this.smr.materials.Length; i++)
{
this.mr.materials[i] = this.smr.materials[i];
}
foreach (Material m in this.mr.materials)
{
m.SetInt("_DoSkinning", 1);
materials[i] = new Material(this.smr.materials[i]);
materials[i].SetInt("_DoSkinning", 1);
}
this.mr.materials = materials;

this.shaderDQBlend.SetInt("textureWidth", textureWidth);

Expand Down

0 comments on commit 5650428

Please sign in to comment.