{
 "id": "thin-film-iridescence",
 "title": "Thin-film iridescence",
 "aliases": [],
 "domain": "materials",
 "subdomain": "layered BRDF",
 "stage": "material",
 "realtime": "realtime",
 "platforms": [
  "webgl2",
  "webgpu",
  "desktop-gpu",
  "mobile-gpu",
  "unity",
  "unreal",
  "godot",
  "blender"
 ],
 "year_introduced": 2017,
 "inputs": [
  "material-params",
  "normals"
 ],
 "outputs": [
  "radiance"
 ],
 "style": "photoreal",
 "dynamic": "both",
 "summary": "Models soap-bubble and oil-slick colours by evaluating interference of light reflected from the top and bottom of a thin dielectric film, folded into the Fresnel term of a microfacet BRDF. Belcour and Barla give a fast, closed-form spectral approximation.",
 "how_it_works": "Light striking a thin film of thickness d and index n reflects off both interfaces; the two waves differ by an optical path delay of 2 n d cos(theta_t) and interfere, strengthening or cancelling wavelengths depending on angle and thickness. Belcour and Barla treat the film as a replacement Fresnel F(theta, d, eta1, eta2, eta3, kappa3) inside a microfacet model, computing it per wavelength via the Airy summation, then compress the result into a Fourier-domain sensitivity-curve approximation that avoids per-wavelength loops: only a few terms per RGB channel are evaluated. The film thickness can be a texture, giving swirled colours, and the base can be dielectric or conductor. Three.js exposes iridescence, IOR and thickness range in MeshPhysicalMaterial, and glTF has KHR_materials_iridescence.",
 "when_to_use": "Choose it for soap bubbles, oil on water, beetle shells, anodised metal, titanium oxide and coated lenses. Prefer baked colour ramps for stylised iridescence (`toon-shading`-style looks) where physical accuracy is not required. Prefer `clearcoat-layer` for colourless coatings and `openpbr-surface` thin-film layer for interchange.",
 "cost": {
  "class": "cheap",
  "notes": "About two extra Fresnel evaluations with a few trig operations per pixel."
 },
 "failure_modes": [
  "Hue shifts from RGB-only approximation fail to match spectral renderers for thick films",
  "Thickness texture mip filtering averages interference colours, producing muddy greys at distance",
  "Interaction with IBL is approximate; pre-filtered probes need an iridescence-aware Fresnel or reflections look wrong",
  "Rapid angular variation aliases without specular antialiasing"
 ],
 "sources": [
  {
   "role": "primary",
   "key": "doi:10.1145/3072959.3073620",
   "type": "paper",
   "title": "A practical extension to microfacet theory for the modeling of varying iridescence",
   "authors": [
    "Laurent Belcour",
    "Pascal Barla"
   ],
   "year": 2017,
   "venue": "ACM Transactions on Graphics",
   "url": "https://doi.org/10.1145/3072959.3073620",
   "ids": {
    "doi": "10.1145/3072959.3073620"
   },
   "license": null,
   "extra": {
    "csl_type": "journal-article"
   },
   "provenance": {
    "title": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/3072959.3073620",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/3072959.3073620",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "year": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/3072959.3073620",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/3072959.3073620",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/3072959.3073620",
     "checked_at": "2026-11-29T15:51:27.588Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-29T15:51:27.588Z",
   "title_sim": 1,
   "__bib": "belcour2017practical"
  },
  {
   "role": "implementation",
   "key": "gh:mrdoob/three.js",
   "type": "code",
   "title": "mrdoob/three.js",
   "description": "JavaScript 3D Library.",
   "authors": [
    "mrdoob"
   ],
   "year": 2010,
   "venue": "GitHub",
   "url": "https://github.com/mrdoob/three.js",
   "ids": {
    "repo": "mrdoob/three.js"
   },
   "license": "MIT",
   "extra": {
    "stars": 119718,
    "stars_checked": "2026-11-29",
    "archived": false,
    "fork": false,
    "pushed_at": "2026-11-29T11:39:51Z",
    "language": "JavaScript",
    "homepage": "https://threejs.org/",
    "license_name": "MIT License"
   },
   "provenance": {
    "title": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/mrdoob/three.js",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/mrdoob/three.js",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "year": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/mrdoob/three.js",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/mrdoob/three.js",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/mrdoob/three.js",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "license": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/mrdoob/three.js",
     "checked_at": "2026-11-29T15:51:27.588Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-29T15:51:27.588Z",
   "title_sim": null,
   "__bib": "mrdoob2010mrdoob"
  },
  {
   "role": "implementation",
   "key": "gh:gokayfem/glsl-studies",
   "ids": {
    "repo": "gokayfem/glsl-studies"
   },
   "type": "code",
   "title": "gokayfem/glsl-studies",
   "authors": [
    "Gökay Aydoğan"
   ],
   "year": 2026,
   "venue": "GitHub",
   "url": "https://github.com/gokayfem/glsl-studies",
   "license": "MIT",
   "description": "454 procedural graphics studies in GLSL ES 3.00 for WebGL2, from woven cloth and animal fur to glacial terrain and atmospheric optics. Each study includes shader source and a rendered preview.",
   "extra": {
    "stars": 924,
    "stars_checked": "2026-11-30",
    "language": "GLSL",
    "archived": false,
    "fork": false,
    "pushed_at": "2026-11-30T13:13:54Z",
    "homepage": null,
    "license_name": "MIT License"
   },
   "provenance": {
    "title": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/gokayfem/glsl-studies",
     "checked_at": "2026-11-30T21:49:39.376Z"
    },
    "authors": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/gokayfem/glsl-studies",
     "checked_at": "2026-11-30T21:49:39.376Z"
    },
    "year": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/gokayfem/glsl-studies",
     "checked_at": "2026-11-30T21:49:39.376Z"
    },
    "venue": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/gokayfem/glsl-studies",
     "checked_at": "2026-11-30T21:49:39.376Z"
    },
    "url": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/gokayfem/glsl-studies",
     "checked_at": "2026-11-30T21:49:39.376Z"
    },
    "license": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/gokayfem/glsl-studies",
     "checked_at": "2026-11-30T21:49:39.376Z"
    }
   },
   "status": "verified",
   "title_sim": null,
   "checked_at": "2026-11-30T21:49:39.376Z",
   "__bib": "aydoan2026gokayfem"
  }
 ],
 "presets": [
  {
   "id": "iridescence-soap-film",
   "title": "Soap-bubble style iridescence",
   "runtime": "three-material",
   "params": {
    "color": "#ffffff",
    "roughness": 0.05,
    "metalness": 0,
    "iridescence": 1,
    "iridescenceIOR": 1.3,
    "transmission": 0.9,
    "thickness": 0.5
   },
   "basis": "original",
   "license_note": "written for this index; sensible defaults, not measured",
   "execution_fidelity": "faithful-pass",
   "proof": {
    "kind": "rendered",
    "label": "rendered 2026-11-29",
    "ok": true,
    "proof": {
     "ok": true,
     "technique": "thin-film-iridescence",
     "runtime": "three-material",
     "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.6665,
      "std": 0.0641,
      "unique_colors": 115
     },
     "image": "/specimens/iridescence-soap-film.webp",
     "reason": null
    }
   }
  }
 ],
 "related": [
  "clearcoat-layer",
  "openpbr-surface",
  "ggx-trowbridge-reitz"
 ],
 "extends": [],
 "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/materials/thin-film-iridescence.json"
 },
 "solves": [
  "soap bubble or oil slick colours look wrong",
  "beetle shell or anodised metal needs rainbow sheen",
  "colour shifts with viewing angle on coated surfaces",
  "need interference colours in a pbr shader",
  "titanium or coated lens tint"
 ],
 "authority": "Belcour & Barla, 2017",
 "url": "https://texelatlas.vercel.app/t/thin-film-iridescence/",
 "execution_fidelity": "faithful-pass",
 "fidelity_label": "Faithful Pass",
 "benchmark_eligible": true,
 "gpu_weight": {
  "weight_x": 2.47,
  "tier": "light",
  "p50_ms": 0.0814,
  "p95_ms": 0.0838,
  "baseline_p50_ms": 0.0329,
  "gpu": "Tesla T4/PCIe/SSE2",
  "resolution": "1920x1080",
  "method": "opengl-timer-query",
  "frames": 40,
  "preset_id": "iridescence-soap-film",
  "execution_fidelity": "faithful-pass",
  "fidelity_label": "Faithful Pass",
  "benchmark_eligible": true,
  "generated_at": "2026-11-30T21:07:47Z",
  "l4": {
   "weight_x": 2.16,
   "tier": "light",
   "p50_ms": 0.0344,
   "p95_ms": 0.0349,
   "speedup_x": 2.37,
   "gpu": "NVIDIA L4/PCIe/SSE2",
   "resolution": "1920x1080",
   "baseline_p50_ms": 0.0159
  },
  "a100": {
   "weight_x": 1.48,
   "tier": "feather",
   "p50_ms": 0.0426,
   "p95_ms": 0.0427,
   "speedup_x": 1.91,
   "gpu": "NVIDIA A100-SXM4-40GB/PCIe/SSE2",
   "resolution": "1920x1080",
   "baseline_p50_ms": 0.0288
  }
 }
}