feat(editor): add --gen-texture-bayer ordered-dither pattern

81st procedural texture: classic 4x4 Bayer ordered-dither
matrix tiled across the image. Each pixel's color comes
from interpolating bg → fg by the matrix value at
(x mod 4, y mod 4) normalized to [0, 1]:

       0  8  2 10
      12  4 14  6
       3 11  1  9
      15  7 13  5

cellSize parameter scales the matrix block (default 4 px,
giving a 16-px seamless tile; cellSize=8 gives a 32-px
chunky retro look).

Useful for 8-bit / monochrome-CRT-style backdrops, ordered-
shadow approximations on low-bit palettes, retro arcade
splash overlays, paper-spritesheet rendering, and as a
deterministic alternative to --gen-texture-noise for
binary or near-binary palettes.
This commit is contained in:
Kelsi 2026-05-09 14:20:02 -07:00
parent 6c2f5cf9ca
commit 25ada9bbfb
3 changed files with 58 additions and 0 deletions

View file

@ -123,6 +123,7 @@ const char* const kArgRequired[] = {
"--gen-texture-dewdrops", "--gen-texture-pinwheel",
"--gen-texture-scratched-metal", "--gen-texture-crackle",
"--gen-texture-star", "--gen-texture-halftone",
"--gen-texture-bayer",
"--validate-glb", "--info-glb", "--info-glb-tree", "--info-glb-bytes",
"--validate-jsondbc", "--check-glb-bounds", "--validate-stl",
"--validate-png", "--validate-blp",