Skip to content

Mosaic

Pixelates an image by quantizing it to a grid of uniform-color cells.

Category: Effects Menu path: Effects > Mosaic

Ports

PortTypeDirectionDescription
inimageRgba16finputInput image
outimageRgba16foutputPixelated result

Parameters

ParamTypeDefaultDescription
cellsvec2(10, 10)Number of cells in X and Y. Linked by default. Higher values = smaller cells = less pixelation.

Expose Channels

When enabled (E button on node header), adds input ports that override params via edge connections:

PortTypeOverrides
cells_invec2cells

How It Works

The shader quantizes each pixel's UV coordinate to the center of its grid cell, then samples the input texture at that quantized position. All pixels within the same cell sample from the same point, producing the characteristic blocky mosaic look. Runs entirely on GPU in a single pass.

Usage Examples

Basic: Pixelate an image

Connect any image source to Mosaic. Lower cells values (e.g. 20x20) give large blocky pixels, higher values give subtle pixelation.

Creative: Match Random field block size

Use Mosaic to pixelate a source image so its blocks match a Random field's scale. If the Random field uses scale of (50, 50) on a 1920x1080 comp, set Mosaic cells to (1920/50, 1080/50) = (38.4, 21.6).

Tips

  • Cells are linked by default (uniform X/Y). Unlink for non-square pixels.
  • Minimum 1 cell per axis. Values below 1 are clamped.
  • At cells=(1,1) the entire image becomes a single averaged color.
  • Place before Transform2D for seamless tiling of pixelated content.
  • Random — produces blocky random values at a configurable scale
  • Posterize — reduces color precision (different from spatial pixelation)
  • Tile — repeats content in a grid