Fixed normals nor averaging when at a corner.

This commit is contained in:
Tleety
2014-06-04 05:56:38 +02:00
parent 74b86bc6d4
commit d5dcb0b72c
3 changed files with 5 additions and 2 deletions
+3
View File
@@ -223,6 +223,8 @@ void Model::getSimilarVertexIndex()
{
glm::vec3 tempNormal, tempTangent, tempBiTangent;
if(glm::dot(Normals[i], Normals[t]) > 0)
{
tempNormal = Normals[i] + Normals[t];
tempTangent = TangentNormals[i] + TangentNormals[t];
tempBiTangent = BiTangentNormals[i] + BiTangentNormals[t];
@@ -235,6 +237,7 @@ void Model::getSimilarVertexIndex()
BiTangentNormals[i] = tempBiTangent;
BiTangentNormals[t] = tempBiTangent;
}
}
}
}