Skip to content

posterize

posterize(inputColor, bands): Node<"vec4">

Defined in: packages/nodes/src/retro/posterize.ts:25

Posterize color to create flat, comic-book style bands. This is semantically equivalent to quantize but with artist-friendly naming.

Parameters

inputColor

Node<"vec4">

The input color (vec4 with alpha)

bands

FloatInput

Number of color bands (2-16 typical)

Returns

Node<"vec4">

Posterized color

Examples

// Create comic-book style with 4 bands
posterize(texture(tex, uv()), 4)
// Subtle posterization with 8 bands
posterize(color, 8)
// Dynamic posterization with uniform
posterize(color, bandsUniform)