Tweak to how polygon orientation is determined #2137
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Makes small tweaks to clarify and improve the algorithm for determining polygon orientation.
Main thing that sparked this dive was the mystery of how a polygon with a dot of 0 can be treated as either both facing directions or "neither" (always rendered) for poly face culling depending on whether the first/second vertex is overlapping the 3rd vertex.
After essentially rewriting the entire algorithm and coming to almost exactly the same conclusions as the original algorithm i can now explain this by the fact that the initial vectors have a length of 0.
Doesn't really explain why they decided to handle those vectors differently, but it at least gives us some excuse to go off of.
Current caveats:
I have yet to figure out why we're doing normalization currently, but i kept it anyway. I'm assuming that i have simply yet to find some horrifying edge case.Update: i found the edge case, i... also found another edge case that isn't covered by it?
i dunno what's going on there