diff options
| author | Guillaume DEVOILLE <[email protected]> | 2021-05-13 13:58:51 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-05-13 13:58:51 +0200 |
| commit | 45b0dc63cdc24d4613af4725475bd0575d0dae4c (patch) | |
| tree | 76265880895169844553a039d768f838b387d12c /src/models.c | |
| parent | fff06d24da52c82f0f792088d97e7b0589eaeba2 (diff) | |
| download | raylib-45b0dc63cdc24d4613af4725475bd0575d0dae4c.tar.gz raylib-45b0dc63cdc24d4613af4725475bd0575d0dae4c.zip | |
Fixed GLTF boneWeights uint32 loading (#1768)
boneWeights uint32 were loaded in normals instead of boneWeights.
Diffstat (limited to 'src/models.c')
| -rw-r--r-- | src/models.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/models.c b/src/models.c index 177a1123..f9bdbeea 100644 --- a/src/models.c +++ b/src/models.c @@ -4289,10 +4289,10 @@ static Model LoadGLTF(const char *fileName) for (int a = 0; a < acc->count; a++) { GLTFReadValue(acc, a, readValue, 4, sizeof(unsigned int)); - model.meshes[primitiveIndex].normals[(a*4) + 0] = (float)readValue[0]; - model.meshes[primitiveIndex].normals[(a*4) + 1] = (float)readValue[1]; - model.meshes[primitiveIndex].normals[(a*4) + 2] = (float)readValue[2]; - model.meshes[primitiveIndex].normals[(a*4) + 3] = (float)readValue[3]; + model.meshes[primitiveIndex].boneWeights[(a*4) + 0] = (float)readValue[0]; + model.meshes[primitiveIndex].boneWeights[(a*4) + 1] = (float)readValue[1]; + model.meshes[primitiveIndex].boneWeights[(a*4) + 2] = (float)readValue[2]; + model.meshes[primitiveIndex].boneWeights[(a*4) + 3] = (float)readValue[3]; } } else |
