{
 "id": "simplex-noise",
 "title": "Simplex Noise",
 "aliases": [
  "OpenSimplex (patent-free relative)"
 ],
 "domain": "procgen",
 "subdomain": "noise functions",
 "stage": "procedural",
 "realtime": "realtime",
 "platforms": [
  "webgl2",
  "webgpu",
  "desktop-gpu",
  "mobile-gpu",
  "cpu",
  "unity",
  "unreal",
  "godot",
  "python"
 ],
 "year_introduced": 2001,
 "inputs": [],
 "outputs": [
  "texture",
  "heightfield",
  "volume-density"
 ],
 "style": "both",
 "dynamic": "both",
 "summary": "Gradient noise evaluated on a simplicial grid (triangles in 2D, tetrahedra in 3D) rather than a cubic one, so the number of contributing corners grows linearly with dimension and directional artifacts shrink.",
 "how_it_works": "The input is skewed so the unit hypercubes become sets of simplices; the cell containing the point is found by sorting the fractional coordinates. Only n+1 corners contribute instead of 2^n. Each corner gets a hashed gradient, and its contribution is the dot product times a radially symmetric falloff kernel of the form (r^2 - d^2)^4 clipped at zero beyond the corner's influence radius. Contributions are summed and scaled to roughly unit range, then unskewed coordinates are used for distance. The summation kernel instead of interpolation gives a visually more isotropic field with no axis-aligned bias. The original idea is Perlin's 2001 course material; Gustavson's write-up and GLSL implementations made it practical on GPUs.",
 "when_to_use": "Choose it for 3D/4D animated noise (time as fourth dimension), for volumetric density, or when grid alignment in `improved-perlin-noise` is visible. Prefer `improved-perlin-noise` in 2D when you need simplicity or analytic derivatives are already derived for it, and note that classic 3D simplex was patented in the US until 2022, so older engines ship OpenSimplex variants.",
 "cost": {
  "class": "cheap",
  "notes": "Fewer corners than cubic Perlin in 3D and above; in 2D the two are comparable."
 },
 "failure_modes": [
  "Patent history (US 6867776, expired January 2022) led many libraries to ship look-alike variants with different output, so seeds are not portable across implementations",
  "Visible diagonal bias in some 2D implementations that skew incorrectly",
  "Sharp falloff kernel makes derivatives noisier than quintic Perlin when used for normals",
  "Output range differs per dimension and per library, so scale constants copied between codebases are wrong"
 ],
 "sources": [
  {
   "role": "primary",
   "key": "url:https://weber.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf",
   "type": "web",
   "title": "Simplex noise demystified",
   "authors": [
    "Stefan Gustavson"
   ],
   "year": null,
   "venue": "weber.itn.liu.se",
   "url": "https://weber.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf",
   "ids": {},
   "license": null,
   "extra": {
    "http_status": 0,
    "live": false,
    "archive": {
     "url": "http://web.archive.org/web/20230309010121/https://weber.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf",
     "timestamp": "20230309010121"
    },
    "page_title": null,
    "host": "weber.itn.liu.se",
    "title_confirmed_by_page": false,
    "title_unconfirmed": false
   },
   "provenance": {
    "title": {
     "authority": "research-draft",
     "endpoint": "title_hint/author_hint, checked against page title where available",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "wayback",
     "endpoint": "https://archive.org/wayback/available?url=https://weber.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "research-draft",
     "endpoint": "title_hint/author_hint, checked against page title where available",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "wayback",
     "endpoint": "https://archive.org/wayback/available?url=https://weber.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "year": {
     "authority": "research-draft",
     "endpoint": "title_hint/author_hint, checked against page title where available",
     "checked_at": "2026-11-29T15:51:27.588Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-29T15:51:27.588Z",
   "title_sim": null,
   "__bib": "gustavsonsimplex"
  },
  {
   "role": "primary",
   "key": "doi:10.1080/2151237x.2012.649621",
   "type": "paper",
   "title": "Efficient Computational Noise in GLSL",
   "authors": [
    "Ian McEwan",
    "David Sheets",
    "Mark Richardson",
    "Stefan Gustavson"
   ],
   "year": 2012,
   "venue": "Journal of Graphics Tools",
   "url": "https://doi.org/10.1080/2151237x.2012.649621",
   "ids": {
    "doi": "10.1080/2151237x.2012.649621"
   },
   "license": null,
   "extra": {
    "csl_type": "journal-article"
   },
   "provenance": {
    "title": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1080/2151237x.2012.649621",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1080/2151237x.2012.649621",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "year": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1080/2151237x.2012.649621",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1080/2151237x.2012.649621",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1080/2151237x.2012.649621",
     "checked_at": "2026-11-29T15:51:27.588Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-29T15:51:27.588Z",
   "title_sim": 1,
   "__bib": "mcewan2012efficient"
  },
  {
   "role": "implementation",
   "key": "gh:stegu/webgl-noise",
   "type": "code",
   "title": "stegu/webgl-noise",
   "description": "GLSL procedural noise functions compatible with WebGL",
   "authors": [
    "stegu"
   ],
   "year": 2016,
   "venue": "GitHub",
   "url": "https://github.com/stegu/webgl-noise",
   "ids": {
    "repo": "stegu/webgl-noise"
   },
   "license": "MIT",
   "extra": {
    "stars": 605,
    "stars_checked": "2026-11-29",
    "archived": false,
    "fork": true,
    "pushed_at": "2025-04-27T07:51:17Z",
    "language": "C",
    "homepage": null,
    "license_name": "MIT License"
   },
   "provenance": {
    "title": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/stegu/webgl-noise",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/stegu/webgl-noise",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "year": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/stegu/webgl-noise",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/stegu/webgl-noise",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/stegu/webgl-noise",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "license": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/stegu/webgl-noise",
     "checked_at": "2026-11-29T15:51:27.588Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-29T15:51:27.588Z",
   "title_sim": null,
   "__bib": "stegu2016stegu"
  },
  {
   "role": "implementation",
   "key": "gh:jwagner/simplex-noise.js",
   "type": "code",
   "title": "jwagner/simplex-noise.js",
   "description": "A fast simplex noise implementation in Javascript / Typescript.",
   "authors": [
    "jwagner"
   ],
   "year": 2012,
   "venue": "GitHub",
   "url": "https://github.com/jwagner/simplex-noise.js",
   "ids": {
    "repo": "jwagner/simplex-noise.js"
   },
   "license": "MIT",
   "extra": {
    "stars": 1853,
    "stars_checked": "2026-11-29",
    "archived": false,
    "fork": false,
    "pushed_at": "2024-07-26T17:06:06Z",
    "language": "TypeScript",
    "homepage": null,
    "license_name": "MIT License"
   },
   "provenance": {
    "title": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/jwagner/simplex-noise.js",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/jwagner/simplex-noise.js",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "year": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/jwagner/simplex-noise.js",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/jwagner/simplex-noise.js",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/jwagner/simplex-noise.js",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "license": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/jwagner/simplex-noise.js",
     "checked_at": "2026-11-29T15:51:27.588Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-29T15:51:27.588Z",
   "title_sim": null,
   "__bib": "jwagner2012jwagner"
  }
 ],
 "presets": [
  {
   "id": "simplex-noise-specimen",
   "title": "2D simplex noise over its skewed triangular lattice",
   "runtime": "glsl-fragment",
   "params": {
    "SCALE": 5
   },
   "code": "// 2D simplex noise: skewed triangular lattice (white lines) with three radially-attenuated gradient contributions per triangle.\nconst float SCALE = 5.0;\nvec2 grad(vec2 i) {\n    float a = 6.2831853 * fract(sin(dot(i, vec2(127.1, 311.7))) * 43758.5453);\n    return vec2(cos(a), sin(a));\n}\nfloat simplex(vec2 v) {\n    const float F = 0.3660254, G = 0.2113249;\n    vec2 i = floor(v + (v.x + v.y) * F);\n    vec2 x0 = v - i + (i.x + i.y) * G;\n    vec2 o = x0.x > x0.y ? vec2(1, 0) : vec2(0, 1);\n    vec2 x1 = x0 - o + G, x2 = x0 - 1.0 + 2.0 * G;\n    float n = 0.0;\n    float t0 = max(0.5 - dot(x0, x0), 0.0); n += t0 * t0 * t0 * t0 * dot(grad(i), x0);\n    float t1 = max(0.5 - dot(x1, x1), 0.0); n += t1 * t1 * t1 * t1 * dot(grad(i + o), x1);\n    float t2 = max(0.5 - dot(x2, x2), 0.0); n += t2 * t2 * t2 * t2 * dot(grad(i + 1.0), x2);\n    return 70.0 * n;\n}\nvoid mainImage(out vec4 fragColor, in vec2 fragCoord) {\n    vec2 uv = fragCoord / iResolution.xy;\n    vec2 p = uv * SCALE;\n    float n = simplex(p) * 0.5 + 0.5;\n    float n2 = simplex(p * 2.0 + 7.0) * 0.5 + 0.5;\n    float h = 0.7 * n + 0.3 * n2;\n    vec3 col = 0.5 + 0.5 * cos(6.2831 * (h * 1.1 + vec3(0.0, 0.1, 0.2)));\n    col *= 0.7 + 0.3 * smoothstep(0.0, 0.5, abs(fract(h * 10.0) - 0.5));\n    vec2 s = p + (p.x + p.y) * 0.3660254;\n    vec2 f = fract(s);\n    float edge = min(min(f.x, 1.0 - f.x), min(min(f.y, 1.0 - f.y), abs(f.x + f.y - 1.0) * 0.7071));\n    col = mix(col, vec3(1.0), smoothstep(0.02, 0.008, edge) * 0.8);\n    fragColor = vec4(pow(col, vec3(0.8)), 1.0);\n}\n",
   "basis": "original",
   "license_note": "written for this index",
   "execution_fidelity": "faithful-pass",
   "proof": {
    "kind": "rendered",
    "label": "rendered 2026-11-29",
    "ok": true,
    "proof": {
     "ok": true,
     "technique": "simplex-noise",
     "runtime": "glsl-fragment",
     "checked_at": "2026-11-29T15:51:50.471Z",
     "renderer": "Chromium 145.0.7632.6 headless, WebGL2 via ANGLE/SwiftShader, 512×512, iTime=1.5",
     "stats": {
      "mean": 0.3738,
      "std": 0.2879,
      "unique_colors": 681
     },
     "image": "/specimens/simplex-noise-specimen.webp",
     "reason": null
    }
   }
  }
 ],
 "related": [
  "improved-perlin-noise",
  "perlin-noise",
  "fractal-brownian-motion"
 ],
 "extends": [
  "perlin-noise"
 ],
 "supersedes": [],
 "combines_with": [],
 "provenance": {
  "prose": "original text written for this index (research draft, editorially reviewed)",
  "sources_verified_at": "2026-11-29T15:51:27.588Z",
  "draft": "data/drafts/procgen/simplex-noise.json"
 },
 "solves": [
  "perlin noise shows grid-aligned artefacts",
  "need animated 3d or 4d noise cheaply",
  "noise for volumetric density with less directional bias",
  "noise cost grows too fast in higher dimensions",
  "smoother organic noise for clouds or terrain"
 ],
 "authority": "Gustavson",
 "url": "https://texelatlas.vercel.app/t/simplex-noise/",
 "execution_fidelity": "faithful-pass",
 "fidelity_label": "Faithful Pass",
 "benchmark_eligible": true,
 "gpu_weight": {
  "weight_x": 4.92,
  "tier": "light",
  "p50_ms": 0.1619,
  "p95_ms": 0.1711,
  "baseline_p50_ms": 0.0329,
  "gpu": "Tesla T4/PCIe/SSE2",
  "resolution": "1920x1080",
  "method": "opengl-timer-query",
  "frames": 40,
  "preset_id": "simplex-noise-specimen",
  "execution_fidelity": "faithful-pass",
  "fidelity_label": "Faithful Pass",
  "benchmark_eligible": true,
  "generated_at": "2026-11-30T21:07:47Z",
  "l4": {
   "weight_x": 3.92,
   "tier": "light",
   "p50_ms": 0.0623,
   "p95_ms": 0.0629,
   "speedup_x": 2.6,
   "gpu": "NVIDIA L4/PCIe/SSE2",
   "resolution": "1920x1080",
   "baseline_p50_ms": 0.0159
  },
  "a100": {
   "weight_x": 2.77,
   "tier": "light",
   "p50_ms": 0.0798,
   "p95_ms": 0.0799,
   "speedup_x": 2.03,
   "gpu": "NVIDIA A100-SXM4-40GB/PCIe/SSE2",
   "resolution": "1920x1080",
   "baseline_p50_ms": 0.0288
  }
 }
}