Merge pull request #1181 from ctrlaltdavid/fix/gltf-colors

Fix glTF mesh colors
This commit is contained in:
daleglass 2021-04-24 20:24:26 +02:00 committed by GitHub
commit c7e79a5e3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1404,7 +1404,7 @@ bool GLTFSerializer::buildGeometry(HFMModel& hfmModel, const hifi::VariantHash&
if (colors.size() == partVerticesCount * colorStride) {
for (int n = 0; n < colors.size(); n += colorStride) {
mesh.colors.push_back(glm::vec3(colors[n], colors[n + 1], colors[n + 2]));
mesh.colors.push_back(ColorUtils::tosRGBVec3(glm::vec3(colors[n], colors[n + 1], colors[n + 2])));
}
} else {
if (meshAttributes.contains("COLOR_0")) {