Skip to content

Commit

Permalink
Update rmodels.c
Browse files Browse the repository at this point in the history
  • Loading branch information
raysan5 committed Jul 7, 2024
1 parent df4ff4e commit b8e5179
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/rmodels.c
Original file line number Diff line number Diff line change
Expand Up @@ -5172,7 +5172,7 @@ static Model LoadGLTF(const char *fileName)

// Transform the vertices
float *vertices = model.meshes[meshIndex].vertices;
for (int k = 0; k < attribute->count; k++)
for (unsigned int k = 0; k < attribute->count; k++)
{
Vector3 vt = Vector3Transform((Vector3){ vertices[3*k], vertices[3*k+1], vertices[3*k+2] }, worldMatrix);
vertices[3*k] = vt.x;
Expand All @@ -5196,7 +5196,7 @@ static Model LoadGLTF(const char *fileName)

// Transform the normals
float *normals = model.meshes[meshIndex].normals;
for (int k = 0; k < attribute->count; k++)
for (unsigned int k = 0; k < attribute->count; k++)
{
Vector3 nt = Vector3Transform((Vector3){ normals[3*k], normals[3*k+1], normals[3*k+2] }, worldMatrixNormals);
normals[3*k] = nt.x;
Expand All @@ -5220,7 +5220,7 @@ static Model LoadGLTF(const char *fileName)

// Transform the tangents
float *tangents = model.meshes[meshIndex].tangents;
for (int k = 0; k < attribute->count; k++)
for (unsigned int k = 0; k < attribute->count; k++)
{
Vector3 tt = Vector3Transform((Vector3){ tangents[3*k], tangents[3*k+1], tangents[3*k+2] }, worldMatrix);
tangents[3*k] = tt.x;
Expand Down

0 comments on commit b8e5179

Please sign in to comment.