16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 06:59:18 +02:00

shadow visibilty fixes, more strict degenerate triangle detection

This commit is contained in:
tmj-fstate
2017-07-27 18:23:48 +02:00
parent 000603877c
commit bb58156513
10 changed files with 173 additions and 139 deletions

View File

@@ -77,7 +77,7 @@ bool
degenerate( VecType_ const &Vertex1, VecType_ const &Vertex2, VecType_ const &Vertex3 ) {
// degenerate( A, B, C, minarea ) = ( ( B - A ).cross( C - A ) ).lengthSquared() < ( 4.0f * minarea * minarea );
return glm::length2( glm::cross( Vertex2 - Vertex1, Vertex3 - Vertex1 ) ) < std::numeric_limits<VecType_::value_type>::epsilon();
return ( glm::length2( glm::cross( Vertex2 - Vertex1, Vertex3 - Vertex1 ) ) == 0.0 );
}
//---------------------------------------------------------------------------