Skip to content

Fix half-pixel offset when sampling images using pixel centers not corners#1499

Open
Keavon wants to merge 1 commit intolinebender:mainfrom
Keavon:fix-images-rendering-blurry
Open

Fix half-pixel offset when sampling images using pixel centers not corners#1499
Keavon wants to merge 1 commit intolinebender:mainfrom
Keavon:fix-images-rendering-blurry

Conversation

@Keavon
Copy link
Copy Markdown

@Keavon Keavon commented Mar 11, 2026

Fixes #972 in Vello and GraphiteEditor/Graphite#3018 in Graphite.

Here are some screenshots (view them at exactly 100% scale) from the Graphite viewport.

Blurry (currently in Vello):

image

Pixel-perfect (this fix):

image

Ground truth pixel-perfect (Graphite's SVG renderer, not Vello):

image

Disclosure: this is discovered and fixed with the help of Claude Code, but tested in Graphite. I have not, however, tested this in isolation outside of Graphite, but that might be something a reviewer could help with.

@nicoburns nicoburns added the C-classic Applies to the classic `vello` crate label Mar 11, 2026
@DJMcNab
Copy link
Copy Markdown
Member

DJMcNab commented Mar 12, 2026

I believe that this change is correct - thanks!

I'm slightly surprised that this does not fix any of the known_issues tests, nor indeed changes any of the other snapshots? I would quite like this to have some test coverage.

I think that this should also have a changelog entry, but I won't block on you adding that.

@Keavon
Copy link
Copy Markdown
Author

Keavon commented Mar 12, 2026

Is the changelog entry something you could add, if you don't mind? I'm not very familiar with your development processes for doing that effectively. (I assume we're just talking about writing a sentence for that, presumably using a certain style that matches the others in the same phrasing.)

@DJMcNab
Copy link
Copy Markdown
Member

DJMcNab commented Mar 18, 2026

Yeah, as I noted the changelog entry isn't blocking. This PR is currently blocked on CI though, and (possibly relatedly) test coverage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-classic Applies to the classic `vello` crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Images do not roundtrip

3 participants