Fix unintentional backface culling in triangle intersect

This also fixes #194. The backface culling is unintentional because it is not documented anywhere and we can't give the triangle a normal so just assume the general case.
This commit is contained in:
Sven-Hendrik Haase 2015-10-20 04:05:58 +02:00
parent 32fc69ee11
commit 96b7850cab

View File

@ -49,7 +49,7 @@ namespace glm
typename genType::value_type a = glm::dot(e1, p); typename genType::value_type a = glm::dot(e1, p);
typename genType::value_type Epsilon = std::numeric_limits<typename genType::value_type>::epsilon(); typename genType::value_type Epsilon = std::numeric_limits<typename genType::value_type>::epsilon();
if(a < Epsilon) if(a < Epsilon && a > -Epsilon)
return false; return false;
typename genType::value_type f = typename genType::value_type(1.0f) / a; typename genType::value_type f = typename genType::value_type(1.0f) / a;