Add dithering to gradient code to avoid banding
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 4.3k
- Forks
- 300
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 61
Description
Right now, gradients between two very similar colors in Vello suffer from banding.
Here's an example from Masonry:
In all the examples I've found, the banding is subtle, but noticeable, especially with non-axis-aligned gradients.
Vello should use dithering techniques to make those gradients with very small increments more diffuse. The dithering pattern used should be deterministic, to avoid adding false positives to screenshot tests.
There's the question of what coordinate system the dithering pattern should be based on. Ideally, we would want the dithering pattern to not change when a shape is moved or the viewport is scrolled, so the dithering pattern should probably be transform-agnostic; eg, it should probably be based on the path coordinates alone.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating Vello's gradient implementation and the screenshot-test coverage for gradients. Investigate a deterministic, transform-agnostic dithering approach that reduces banding without changing when a shape moves or the viewport scrolls. Done means subtle, similar-color gradients appear less banded and the relevant screenshot tests remain stable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100