-
Notifications
You must be signed in to change notification settings - Fork 136
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
Improve numerical robustness in path tiling #401
Merged
Merged
Commits on Nov 1, 2023
-
Add test scene to trigger numerical robustness issues
This test scene contains a number of subpaths that contain line segments aligned to the grid, or that cross grid corners. These trigger one-pixel artifacts with the multisampled rendering modes, and are now correct with area antialiasing.
Configuration menu - View commit details
-
Copy full SHA for 6dd71dd - Browse repository at this point
Copy the full SHA 6dd71ddView commit details -
Change to tile-relative segment coordinates
WIP. Currently works but no cleanup.
Configuration menu - View commit details
-
Copy full SHA for faf288a - Browse repository at this point
Copy the full SHA faf288aView commit details -
Move numerical robustness into tiling
Change representation to tile-relative coordinates for segment endpoints.
Configuration menu - View commit details
-
Copy full SHA for 6f2a83e - Browse repository at this point
Copy the full SHA 6f2a83eView commit details -
Configuration menu - View commit details
-
Copy full SHA for b6e90a9 - Browse repository at this point
Copy the full SHA b6e90a9View commit details -
This commit fixes a number of problems with multisampled AA. There are three main changes: * This fixes a cut'n'paste typo where the third word of four in resolution was computed incorrectly. This degraded antialiasing quality. * There is a bit more logic in `is_bump` to handle crossings at the top of the tile better. This is not done in the even-odd variant because it is seemingly not needed. (I don't have a careful analysis why, but suspect it has something to do with the fact that double counting or getting the sign wrong is less critical in even-odd than nonzero). * There is a tweak in tiling to cause vertical lines sent to fine to be not pixel-aligned. That's a difficult case for msaa (area doesn't care). The latter two might be considered hacky, but examination of the test cases should improve confidence. There were artifacts in glyph rendering that this patch also improves, so in any case it's better than the previous state.
Configuration menu - View commit details
-
Copy full SHA for ce0abff - Browse repository at this point
Copy the full SHA ce0abffView commit details -
CI is broken because the WebGPU stuff doesn't have stable semver guarantees. This pins the web-sys version to protect against that.
Configuration menu - View commit details
-
Copy full SHA for 9861e50 - Browse repository at this point
Copy the full SHA 9861e50View commit details -
Add comments to help explain msaa logic
To say that the msaa logic is dense and hard to understand is an understatement. I've added some comments which will I hope will help the reader navigate the code, but ultimately it requires a real explanation. While reviewing the code, I realized that horizontal pixel-aligned lines are already being discarded by separate robustness logic, so that case doesn't need to be handled in is_bump, so I took it out.
Configuration menu - View commit details
-
Copy full SHA for 5a9ddf4 - Browse repository at this point
Copy the full SHA 5a9ddf4View commit details
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.