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.
master
Sven-Hendrik Haase ago%!(EXTRA string=10 years)
parent 32fc69ee11
commit 96b7850cab
  1. 2
      glm/gtx/intersect.inl

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

Loading…
Cancel
Save