mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-07 20:08:14 +00:00
Fixed GLTF boneWeights uint32 loading (#1768)
boneWeights uint32 were loaded in normals instead of boneWeights.
This commit is contained in:

committed by
GitHub

parent
fff06d24da
commit
45b0dc63cd
@@ -4289,10 +4289,10 @@ static Model LoadGLTF(const char *fileName)
|
|||||||
for (int a = 0; a < acc->count; a++)
|
for (int a = 0; a < acc->count; a++)
|
||||||
{
|
{
|
||||||
GLTFReadValue(acc, a, readValue, 4, sizeof(unsigned int));
|
GLTFReadValue(acc, a, readValue, 4, sizeof(unsigned int));
|
||||||
model.meshes[primitiveIndex].normals[(a*4) + 0] = (float)readValue[0];
|
model.meshes[primitiveIndex].boneWeights[(a*4) + 0] = (float)readValue[0];
|
||||||
model.meshes[primitiveIndex].normals[(a*4) + 1] = (float)readValue[1];
|
model.meshes[primitiveIndex].boneWeights[(a*4) + 1] = (float)readValue[1];
|
||||||
model.meshes[primitiveIndex].normals[(a*4) + 2] = (float)readValue[2];
|
model.meshes[primitiveIndex].boneWeights[(a*4) + 2] = (float)readValue[2];
|
||||||
model.meshes[primitiveIndex].normals[(a*4) + 3] = (float)readValue[3];
|
model.meshes[primitiveIndex].boneWeights[(a*4) + 3] = (float)readValue[3];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user