Domain Warping
First appeared 2008 · Iñigo Quílez — Formalized as a noise technique by Íñigo Quílez (2008). · timeline ↗
community / folk Name — A descriptive term popularized by Inigo Quilez (c. 2008) for feeding noise into the input coordinates of more noise; not a personal eponym.
In one line Distorting the input coordinates of a noise (or pattern) function with another noise function before sampling it — producing organic, swirling, marbled textures from otherwise plain noise.
The code
The actual sketch behind the demo above — sandboxed and reproducible. This is the whole thing.
domain-warping/index.html
const SEED = Math.floor(Math.random()*1e9);
// Inigo Quilez style domain warping:
// q = fbm(p)
// r = fbm(p + q)
// color = fbm(p + r)
// Each fbm input is offset by the previous field, producing organic swirls.
function setup() {
noiseSeed(SEED); randomSeed(SEED);
const s = Math.min(windowWidth, windowHeight);
createCanvas(s, s);
pixelDensity(1);
noiseDetail(5, 0.5);
const fbm = (x, y) => noise(x, y);
const SC = 2.4;
const RAMP = [
[16, 24, 48], [36, 64, 102], [70, 130, 140],
[150, 190, 170], [232, 222, 190], [250, 244, 230],
];
const lerpC = (a, b, t) => [a[0]+(b[0]-a[0])*t, a[1]+(b[1]-a[1])*t, a[2]+(b[2]-a[2])*t];
loadPixels();
for (let py = 0; py < height; py++) {
for (let px = 0; px < width; px++) {
const x = (px / width) * SC;
const y = (py / height) * SC;
const qx = fbm(x, y);
const qy = fbm(x + 5.2, y + 1.3);
const rx = fbm(x + 4 * qx + 1.7, y + 4 * qy + 9.2);
const ry = fbm(x + 4 * qx + 8.3, y + 4 * qy + 2.8);
let v = fbm(x + 4 * rx, y + 4 * ry);
v = Math.max(0, Math.min(1, v * 1.3));
const f = v * (RAMP.length - 1);
const i0 = Math.floor(f);
const i1 = Math.min(RAMP.length - 1, i0 + 1);
const c = lerpC(RAMP[i0], RAMP[i1], f - i0);
const idx = 4 * (py * width + px);
pixels[idx] = c[0]; pixels[idx+1] = c[1]; pixels[idx+2] = c[2]; pixels[idx+3] = 255;
}
}
updatePixels();
}How it works
Instead of evaluating f(p) directly, evaluate f at a displaced position: 1. Compute an offset vector from noise at p — e.g. q = (noise(p), noise(p + c)). 2. Sample the field at the warped coordinate: f(p + k·q), where k controls warp strength. Nesting deepens the effect: f(p + k·g(p + k·h(p))) — warping the warp — which is Quílez's classic recipe and the source of fluid, vein- and marble-like flows. Using the same approach on a tiling or SDF (not just noise) bends grids and shapes into wavy, hand-drawn-feeling distortions.
Parameters
warpStrength: number — How far coordinates are displaced before the field is re-sampled.octaves: number — Layers of warping applied recursively for richer distortion.frequency: number — Base frequency of the noise driving the warp.
Lineage
Frequently combined with
- Perlin / Simplex Noise · 6 works
- Fragment Shader (GLSL) · 5 works
- HSL / Hue Cycle · 3 works
- Flow Field / Vector Field · 3 works
- Glitch / Datamosh · 2 works
- 3D Mesh / Geometry · 2 works
- Generative Typography · 1 work
- Raymarching with SDFs · 1 work
- Voronoi Diagram · 1 work
- Plotter-style Hatching · 1 work
- Bezier / Catmull-Rom Splines · 1 work
Works using this algorithm (10)
Last updated 2026-07-16