mirror of
https://github.com/g-truc/glm.git
synced 2024-11-10 12:41:54 +00:00
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:
parent
32fc69ee11
commit
96b7850cab
@ -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…
Reference in New Issue
Block a user