maintenance: minor code tweaks

This commit is contained in:
tmj-fstate
2019-11-09 13:11:22 +01:00
parent 71098a7254
commit 02bd968f51
4 changed files with 13 additions and 5 deletions

View File

@@ -150,8 +150,12 @@ void calculate_tangent(vertex_array &vertices, int type)
const glm::vec3 &t = tan[a];
const glm::vec3 &t2 = tan[vertex_count + a];
vertices[a].tangent = glm::vec4(glm::normalize((t - n * glm::dot(n, t))),
(glm::dot(glm::cross(n, t), t2) < 0.0F) ? -1.0F : 1.0F);
vertices[a].tangent =
glm::vec4(
glm::normalize((t - n * glm::dot(n, t))),
(glm::dot(glm::cross(n, t), t2) < 0.0F) ?
-1.0F :
1.0F);
}
}