fixed obj loader not hashing material index correctly

This commit is contained in:
turanszkij
2018-04-04 12:56:29 +01:00
parent 1ae5a129f3
commit 4f0677347f
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -2901,8 +2901,9 @@ void Model::LoadFromDisk(const std::string& fileName, const std::string& identif
hash<int>{}(index.vertex_index),
hash<int>{}(index.normal_index),
hash<int>{}(index.texcoord_index),
hash<int>{}(materialIndex),
};
size_t vertexHash = (hashes[0] ^ (hashes[1] << 1) >> 1) ^ (hashes[2] << 1);
size_t vertexHash = (((hashes[0] ^ (hashes[1] << 1) >> 1) ^ (hashes[2] << 1)) >> 1) ^ (hashes[3] << 1);
if (uniqueVertices.count(vertexHash) == 0)
{
+1 -1
View File
@@ -9,7 +9,7 @@ namespace wiVersion
// minor features, major updates
const int minor = 16;
// minor bug fixes, alterations, refactors, updates
const int revision = 36;
const int revision = 37;
long GetVersion()