Skip to content

Commit

Permalink
fix: merge bone will break fur
Browse files Browse the repository at this point in the history
  • Loading branch information
anatawa12 committed Oct 8, 2023
1 parent 62014fb commit f629431
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions Editor/Processors/SkinnedMeshes/MeshInfo2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ public void WriteToMesh(Mesh destMesh)
for (var i = 0; i < Vertices.Count; i++)
{
vertices[i] = Vertices[i].Position;
normals[i] = Vertices[i].Normal.normalized;
normals[i] = Vertices[i].Normal;
}

destMesh.vertices = vertices;
Expand All @@ -317,12 +317,7 @@ public void WriteToMesh(Mesh destMesh)
{
var tangents = new Vector4[Vertices.Count];
for (var i = 0; i < Vertices.Count; i++)
{
var tangent3 = (Vector3)Vertices[i].Tangent;
var tangentW = Vertices[i].Tangent.w;
tangent3.Normalize();
tangents[i] = new Vector4(tangent3.x, tangent3.y, tangent3.z, tangentW);
}
tangents[i] = Vertices[i].Tangent;
destMesh.tangents = tangents;
}

Expand Down

0 comments on commit f629431

Please sign in to comment.