Skip to content

More dither patterns: Bayer 2×2, blue noise, halftone, lines, white noise - #19

Merged
narrowstacks merged 1 commit into
mainfrom
dither-patterns
Nov 18, 2026
Merged

narrowstacks merged 1 commit into
mainfrom
dither-patterns

Conversation

@narrowstacks

Copy link
Copy Markdown
Owner

Adds five dither patterns to Image > Dither pattern: Bayer 2×2, Blue noise, Halftone dots, Diagonal lines and White noise.

All of them are a per-pixel threshold, like the existing Bayer patterns, so they cost nothing extra. The wallpaper and scene transitions now share one ditherAt in ShaderCommon.swift. Blue noise reads a 64×64 void-and-cluster tile (4 KB constant array) generated by Design/Dither/blue_noise.py.

Galaxy at the defaults with each dither pattern

Galaxy at the defaults, --time 300, center crops at render resolution.

Verified

  • Bayer 8×8, Bayer 4×4 and None render byte-identical to main (md5 of galaxy snapshots before and after).
  • Frame GPU time on the galaxy is about 0.5 ms for every pattern, the same as Bayer 8×8 (--benchmark).
  • A halftone dissolve transition renders without shader errors.
  • Saved settings store the pattern by raw value, and shaderIndex keeps the old indices, so existing configs are unchanged.

Left alone

  • No Customize window capture: the change is only new entries in the existing Dither menu.
  • Phone Live Photo loop dissolve still uses its own Bayer 8×8 threshold.
  • README media unchanged.

@narrowstacks
narrowstacks merged commit 6db17ff into main Nov 18, 2026
2 checks passed
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