forgot to set texcoords lol

main
Evan Hemsley 2020-07-28 03:05:59 -07:00
parent 1a80f6cdd5
commit 742c38ec7e
1 changed files with 6 additions and 0 deletions

View File

@ -41,6 +41,12 @@ namespace Smuggler
normals[i] = -new Vector3(normal.X, normal.Z, normal.Y); normals[i] = -new Vector3(normal.X, normal.Z, normal.Y);
} }
for (int i = 0; i < texcoords.Length; i++)
{
var texcoord = texcoordAccessor[i];
texcoords[i] = new Vector2(texcoord.X, texcoord.Y);
}
foreach (var (a, b, c) in primitive.GetTriangleIndices()) foreach (var (a, b, c) in primitive.GetTriangleIndices())
{ {
triangles.Add(new Triangle(a, b, c)); triangles.Add(new Triangle(a, b, c));