Skip to content

pixelateBySize

pixelateBySize(inputUV, pixelSize): Node<"vec2">

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

Pixelate UV coordinates with a single pixel size value.

Parameters

inputUV

Node<"vec2">

The UV coordinates to transform

pixelSize

FloatInput

Size of pixels (higher = more pixelated)

Returns

Node<"vec2">

Pixelated UV coordinates

Example

// Pixelate with 8 pixel size
pixelateBySize(uv(), 8)