mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-15 07:00:10 -05:00
Merge pull request #1363 from ousttrue/fix/mesh_normalization
meshを正規化するときに、法線を正規化する
This commit is contained in:
commit
f785bf12c6
|
|
@ -370,7 +370,7 @@ namespace UniGLTF.MeshUtility
|
|||
}
|
||||
else
|
||||
{
|
||||
normals[j] = m.MultiplyVector(normals[j]) - meshNormals[j];
|
||||
normals[j] = m.MultiplyVector(normals[j].normalized) - meshNormals[j];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ namespace UniGLTF.MeshUtility
|
|||
src.vertices = src.vertices.Select(x => m.MultiplyPoint(x)).ToArray();
|
||||
if (src.normals != null && src.normals.Length > 0)
|
||||
{
|
||||
src.normals = src.normals.Select(x => m.MultiplyVector(x)).ToArray();
|
||||
src.normals = src.normals.Select(x => m.MultiplyVector(x.normalized)).ToArray();
|
||||
}
|
||||
if (src.tangents != null && src.tangents.Length > 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user