bayerDither8x8
bayerDither8x8(
inputColor,levels,scale,screenCoord?):Node<"vec4">
Defined in: packages/nodes/src/retro/bayerDither.ts:254
Apply 8x8 Bayer matrix ordered dithering. Fine dither pattern - smoother gradients while maintaining retro feel.
Parameters
inputColor
Node<"vec4">
The input color (vec4 with alpha)
levels
FloatInput = 2
Number of color levels per channel (default: 2 = binary)
scale
FloatInput = 1
Scale of dither pattern (default: 1)
screenCoord?
Node<"vec2">
Screen coordinates (use UV * textureSize for per-sprite)
Returns
Node<"vec4">
Dithered color
Example
// 8-level dithering for smoother retro effectbayerDither8x8(color, 8, 1, uv().mul(textureSize))