Skip to content

Commit

Permalink
i hate how this works
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaklyy committed Apr 6, 2024
1 parent 6e26559 commit 8f6d6ac
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/GPU3D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1013,6 +1013,18 @@ void GPU3D::SubmitPolygon() noexcept
return;
}
}
// dot == 0
// kinda gross hack to get the "correct" result
// polygons should be treated as facing *neither* direction if the first/second vertex is equal to the third vertex's position,
// and as facing *both* directions under any other circumstances (with a dot of 0, ofc)
// needs testing with bigger polygons to make sure this doesn't completely break apart
else if (!((v0->Position[0] == v2->Position[0] && v0->Position[1] == v2->Position[1]) ||
(v1->Position[0] == v2->Position[0] && v1->Position[1] == v2->Position[1])) &&
!(CurPolygonAttr & (3<<6)))
{
LastStripPolygon = NULL;
return;
}

// for strips, check whether we can attach to the previous polygon
// this requires two original vertices shared with the previous polygon, and that
Expand Down

0 comments on commit 8f6d6ac

Please sign in to comment.