Skip to content

Conversation

elcritch
Copy link
Owner

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.

@elcritch elcritch merged commit b3a3176 into main Jun 20, 2025
2 checks passed
@elcritch elcritch deleted the add-sdfy-symmetric-corner branch June 20, 2025 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant