Skip to content
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

Watertightness regression in longpathdash #704

Open
raphlinus opened this issue Sep 26, 2024 · 0 comments · May be fixed by #705
Open

Watertightness regression in longpathdash #704

raphlinus opened this issue Sep 26, 2024 · 0 comments · May be fixed by #705

Comments

@raphlinus
Copy link
Contributor

As of #695 we have a regression in longpathdash, generating artifacts consistent with loss of watertightness. The artifacts are present for both butt and round caps.

longpathdash_butt

longpathdash_round

The most likely explanation is a discrepancy between the way tangents are computed on the CPU when encoding the cap and on the GPU. My guess is that the above patch made these match for cubic segments but not for lines.

Thanks to @DJMcNab for noticing; there's a Zulip thread with a bit of discussion.

@raphlinus raphlinus added this to the Vello 0.3 release milestone Sep 26, 2024
raphlinus added a commit that referenced this issue Sep 26, 2024
When encoding a start tangent for an end cap or closed segment, use
logic designed to match the GPU computed tangent for the first segment.

Note: this changes the GPU calculation to write out the lerp calculation
explicitly rather than use the mix intrinsic, so we can rely on the
rounding behavior. In the presence of fastmath, the rounding behavior is
not guaranteed, but it is verified to work on M1.

Fixes #704, unless we get bitten by fastmath.
@raphlinus raphlinus linked a pull request Sep 26, 2024 that will close this issue
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 a pull request may close this issue.

1 participant