Skip to content

distortPixelate

distortPixelate(uv, pixelSize?): Node <"vec2">

Defined in: packages/nodes/src/distortion/distort.ts:158

Pixelate distortion - snaps UV to grid for chunky pixel effect. Use for transitions or stylized rendering.

Node <"vec2">

Input UV coordinates

FloatInput = 0.05

Size of each “pixel” in UV space (default: 0.05)

Node <"vec2">

Pixelated UV coordinates

const pixelated = distortPixelate(uv, 0.02)
const color = texture(tex, pixelated)