瀏覽代碼

Fixed GLTF boneWeights uint32 loading (#1768)

boneWeights uint32 were loaded in normals instead of boneWeights.
pull/1771/head
Guillaume DEVOILLE 3 年之前
committed by GitHub
父節點
當前提交
45b0dc63cd
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: 4AEE18F83AFDEB23
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. +4
    -4
      src/models.c

+ 4
- 4
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

Loading…
取消
儲存