RemotionUI

Dither Field Background

A two-colour ordered-dither field, quantised to a pixel grid.

PrimitiveShaders

dither-field-bg30fps · 960×540
Install
$ npx remotion-ui@latest add dither-field-bg

A smooth pattern pushed through a dither matrix, so it resolves into two colours on a pixel grid rather than a gradient. It reads as print halftone or an early bitmap display, and it is the one background here that holds an edge: the grid gives type something to sit against.

shape picks the pattern underneath and pattern picks the threshold matrix: the Bayer sizes are ordered and regular, random is white noise and reads as film grain.

The shapes split in two. simplex, warp, dots and wave tile and fill the frame at any scale, use these for a background. ripple, swirl and sphere are bounded shapes with an edge, so below scale={1} they sit as an object in an empty field rather than covering it.

pixelSize is measured in real pixels and deliberately ignores scale, so zooming moves the pattern underneath a grid that stays put. Raise it for a coarser, more obviously digital field; at 1 the dither almost disappears.

Render with --gl=angle. Motion comes from the frame only, so the same frame renders to identical pixels every time.

The dither grid is measured in real pixels and ignores scale, so zooming moves the pattern underneath a grid that stays put. Deterministic by construction: the shader library's own requestAnimationFrame clock is switched off and the time is set from useCurrentFrame(). Render with --gl=angle.

Agent notes

Install first, then import the copied source component locally. AI guide →

Import
@/remotion/primitives/dither-field-bg
  • Use when: full-frame shader backgrounds and ambient GPU fields.
  • Customize: backgroundColor, inkColor, shape, pattern, plus copied source for timing, layout, colors, and typography.
  • Rule: do not import this component from the remotion-ui npm package; it is copied into your project.

Usage

Example
import { DitherFieldBg } from "@/remotion/primitives/dither-field-bg"; // Render with --gl=angle <DitherFieldBg shape="warp" pattern="4x4" />

API Reference

PropTypeDescription
backgroundColorstringThe unlit half of the two-tone field.
inkColorstringThe lit half. The field only ever holds these two colors.
shape"simplex" | "warp" | "dots" | "wave" | "ripple" | "swirl" | "sphere"Pattern the dither is sampled from before the grid quantises it. simplex, warp, dots and wave fill the frame; ripple, swirl and sphere are bounded shapes.
pattern"random" | "2x2" | "4x4" | "8x8"Threshold matrix. Bayer sizes are ordered; random reads as film grain.
pixelSizenumberSize of one dither cell in pixels, 0.5–20. Larger reads more retro.
scalenumberZoom on the underlying pattern, 0.01–4. Below 1 a bounded shape stops covering the frame.
speednumberMultiplies how far the field travels per second.

On this page