-
Notifications
You must be signed in to change notification settings - Fork 6
Add sdfy symmetric corner #158
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR changes it so each corner is generated independently and symmetrically. Then rotation is used to flip the image correctly.
While this works very efficiently it's currently resulting in very annoying visual artifacts on the resulting shadows. This is due to the rotation not being perfect, largely based on factors of PI.
I've yet to figure out how to work around this. I thought I had, by taking the floor of the centering offset and then none after that when reversing the rotation centering. The images generally seem correctly place, but the middle images are either too long or too short by 1 pixel. Sometimes they'll flip from being perfect to being off by one pixel, indicating it is a rounding issue. I suspect it's due to translating to the image center before rotating. I'd like to understand what coordinate system and rotations they're using. Maybe need to setup the transform matrix by hand? Hmmm, that could work.
I'm also still unsure as to whether the coordinates are in Top-Left (Quadrant 4) or something else.