- fix missing font glyphs

This commit is contained in:
Magnus Norddahl 2019-06-23 21:24:37 +02:00
parent 706bc0b7c6
commit e59c5cb947

View file

@ -658,6 +658,7 @@ void PolySWInputAssembly::Load(PolyTriangleThreadData *thread, const void *verti
bool PolyTriangleThreadData::IsDegenerate(const ShadedTriVertex *const* vert)
{
return false;
// A degenerate triangle has a zero cross product for two of its sides.
float ax = vert[1]->gl_Position.X - vert[0]->gl_Position.X;
float ay = vert[1]->gl_Position.Y - vert[0]->gl_Position.Y;
@ -669,7 +670,7 @@ bool PolyTriangleThreadData::IsDegenerate(const ShadedTriVertex *const* vert)
float crossy = az * bx - ax * bz;
float crossz = ax * by - ay * bx;
float crosslengthsqr = crossx * crossx + crossy * crossy + crossz * crossz;
return crosslengthsqr <= 1.e-6f;
return crosslengthsqr <= 1.e-8f;
}
bool PolyTriangleThreadData::IsFrontfacing(TriDrawTriangleArgs *args)