Skip to content

pixelate(inputUV, resolution, pivot?): Node <"vec2">

Defined in: packages/nodes/src/sprite/pixelate.ts:25

Pixelate UV coordinates by snapping to a pixel grid.

Node <"vec2">

The UV coordinates to transform

Vec2Input

Pixel grid resolution as [width, height] or vec2 node

Vec2Input = ...

Center point for pixelation (default: [0.5, 0.5] = center)

Node <"vec2">

Pixelated UV coordinates (snapped to grid centers)

// Pixelate to 16x16 grid (centered)
pixelate(uv(), [16, 16])
// Animate pixelation with uniform (stays centered)
pixelate(uv(), resolutionUniform)
// Pixelate from top-left corner
pixelate(uv(), [16, 16], [0, 1])