-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimize corner quad generation #160
Conversation
I can rebase it after #156 is merged. |
Code looks fine, but I'm also not that familiar with the inner edge generation workings. What exactly does this PR fix? Is it related to #156? Would it affect the outcome of #156, i.e. does #156 need to be tested with this PR or the other way round? Can you provide an example image how it improves distortions? |
#156 introduces a set of changes, one of which, as you know, is corner anti-distortion code. This PR achieves the same result, but instead of compensating for the "bad" generation result, it instead generates a "good" one. So the code is simpler and faster. As a side effect, this approach also improves |
Ah, thanks for clarifying. |
- Distortions appear because we rely on normals in the process of building the quad. - Reworks algorithm to rely on delta vectors instead. - Aligns better with overall shape geometry, and also improves results of `render_offset`.
415634a
to
af546ff
Compare
Ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides the small optimization, LGTM.
Thanks, fixed it and merging 👍 |
render_offset
.