Documentation

Dither

Dithering effect with multiple pattern options

Props

pattern"bayer2" | "bayer4" | "bayer8" | "clusteredDot" | "blueNoise" | "whiteNoise"
Default:bayer4
Dithering pattern algorithm
pixelSizenumber
Default:4
Size of dithering pixels
thresholdnumber
Default:0.5
Luminance threshold for dithering
spreadnumber
Default:1
How much of the luminance range participates in dithering (lower = more solid areas)
colorMode"custom" | "source"
Default:custom
How colors are determined
colorAstring
Default:transparent
Dark color for dithering
colorBstring
Default:#ffffff
Light color for dithering

Usage

<Shader>
  <Dither>
    <Circle />
  </Dither>
</Shader>