mirror of
https://github.com/g-truc/glm.git
synced 2024-11-23 17:14:36 +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 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;
|
||||||
|
Loading…
Reference in New Issue
Block a user