From 564ef7db901dadb7f4e70eb79f58209be7cd3b42 Mon Sep 17 00:00:00 2001 From: GoldenThumbs Date: Mon, 12 Jul 2021 01:06:12 -0500 Subject: [PATCH] Updated models.c - fixed issue where vertex positions being passed in place of vertex normals. --- src/models.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/models.c b/src/models.c index 532dd1788..83d4562d5 100644 --- a/src/models.c +++ b/src/models.c @@ -860,7 +860,7 @@ void UploadMesh(Mesh *mesh, bool dynamic) if (mesh->normals != NULL) { // Enable vertex attributes: normals (shader-location = 2) - void *normals = mesh->animNormals != NULL ? mesh->animNormals : mesh->vertices; + void *normals = mesh->animNormals != NULL ? mesh->animNormals : mesh->normals; mesh->vboId[2] = rlLoadVertexBuffer(normals, mesh->vertexCount*3*sizeof(float), dynamic); rlSetVertexAttribute(2, 3, RL_FLOAT, 0, 0, 0); rlEnableVertexAttribute(2);