Skip to content

Commit 426c4e1

Browse files
committed
Normalize tangents after applying vertex transform
1 parent 262890b commit 426c4e1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

LSLib/Granny/Model/Vertex.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -392,9 +392,9 @@ public void FinalizeInfluences()
392392
public void Transform(Matrix4 transformation, Matrix4 inverse)
393393
{
394394
Position = Vector3.TransformPosition(Position, transformation);
395-
Normal = Vector3.TransformNormalInverse(Normal, inverse);
396-
Tangent = Vector3.TransformNormalInverse(Tangent, inverse);
397-
Binormal = Vector3.TransformNormalInverse(Binormal, inverse);
395+
Normal = Vector3.Normalize(Vector3.TransformNormalInverse(Normal, inverse));
396+
Tangent = Vector3.Normalize(Vector3.TransformNormalInverse(Tangent, inverse));
397+
Binormal = Vector3.Normalize(Vector3.TransformNormalInverse(Binormal, inverse));
398398
}
399399

400400
public void Serialize(WritableSection section)

0 commit comments

Comments
 (0)