Browse Source

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.
Sven-Hendrik Haase 10 years ago
parent
commit
96b7850cab
1 changed files with 1 additions and 1 deletions
  1. 1 1
      glm/gtx/intersect.inl

+ 1 - 1
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;