Skip to content

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.

Node <"vec4">

The input color (vec4 with alpha)

FloatInput = 2

Number of color levels per channel (default: 2 = binary)

FloatInput = 1

Scale of dither pattern (default: 1)

Node <"vec2">

Screen coordinates (use UV * textureSize for per-sprite)

Node <"vec4">

Dithered color

// 8-level dithering for smoother retro effect
bayerDither8x8(color, 8, 1, uv().mul(textureSize))