From 058cdc1a78930121fa6950a465c0cb6f39ca7c8e Mon Sep 17 00:00:00 2001 From: deccer Date: Sun, 30 Oct 2022 11:10:34 +0100 Subject: [PATCH] Add tangents --- src/EngineKit/Graphics/MeshData.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/EngineKit/Graphics/MeshData.cs b/src/EngineKit/Graphics/MeshData.cs index ea10938..8f84e25 100644 --- a/src/EngineKit/Graphics/MeshData.cs +++ b/src/EngineKit/Graphics/MeshData.cs @@ -317,5 +317,8 @@ private void AddVertex( _uvs.Add(uv ?? Vector2.Zero); _realTangents.Add(realTangent ?? Vector4.Zero); _biTangents.Add(Vector3.Zero); + _tangents.Add(realTangent != null + ? new Vector3(realTangent.Value.X, realTangent.Value.Y, realTangent.Value.Z) + : Vector3.Zero); } } \ No newline at end of file