Toggle Sidebar B
Light & dark mode D

Dither

Dithering effect with multiple pattern options

Dithering effect with multiple pattern options

Props

PropTypeDefaultDescription
pattern"bayer2" | "bayer4" | "bayer8" | "clusteredDot" | "blueNoise" | "whiteNoise"bayer4Dithering pattern algorithm
pixelSizerange4Size of dithering pixels
thresholdrange0.5Luminance threshold for dithering
spreadrange1How much of the luminance range participates in dithering (lower = more solid areas)
colorMode"custom" | "source"customHow colors are determined
colorAcolortransparentDark color for dithering
colorBcolor#ffffffLight color for dithering

Usage

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