{
 "id": "rgb-x-intrinsic-decomposition",
 "title": "RGB↔X: Diffusion Intrinsic Decomposition & Neural Rendering",
 "aliases": [
  "RGB-X",
  "RGB<->X"
 ],
 "domain": "genai",
 "subdomain": "materials",
 "stage": "generation",
 "realtime": "offline",
 "platforms": [
  "cuda",
  "desktop-gpu"
 ],
 "year_introduced": 2024,
 "inputs": [
  "photos",
  "material-params"
 ],
 "outputs": [
  "material-params",
  "normals",
  "irradiance-probes",
  "ldr-image"
 ],
 "style": "photoreal",
 "dynamic": "static",
 "summary": "A bidirectional diffusion framework that decomposes any photograph into PBR intrinsic channels (albedo, normal, roughness, metallic, irradiance) and synthesizes photorealistic relit images back from partial or edited intrinsic channels.",
 "how_it_works": "RGB→X fine-tunes a latent diffusion model conditioned on an input photo and channel selector prompt to predict albedo, surface normals, roughness, metalness, and diffuse irradiance maps—even for complex indoor/outdoor scenes with indirect light. Conversely, X→RGB accepts any subset of intrinsic buffers (for example, edited albedo or a new lighting pass) and synthesizes a coherent, physically plausible photorealistic image with realistic shadows and inter-reflections.",
 "when_to_use": "Choose for single-photo PBR extraction, neural relighting, material replacement in real photos, or turning rough G-buffer renders into photorealistic look-dev concepts.",
 "cost": {
  "class": "heavy",
  "notes": "Latent diffusion inference per channel/image (seconds on a desktop GPU); offline or interactive look-dev."
 },
 "failure_modes": [
  "Cross-channel alignment can drift slightly across independent diffusion draws",
  "Lacks strict multi-view 3D consistency without explicit 3D projection/baking",
  "Strong cast shadows occasionally leak weakly into predicted albedo"
 ],
 "sources": [
  {
   "role": "primary",
   "key": "doi:10.1145/3641519.3657445",
   "type": "paper",
   "title": "RGB↔X: Image decomposition and synthesis using material- and lighting-aware diffusion models",
   "authors": [
    "Zheng Zeng",
    "Valentin Deschaintre",
    "Iliyan Georgiev",
    "Yannick Hold-Geoffroy",
    "Yiwei Hu",
    "Fujun Luan",
    "Ling-Qi Yan",
    "Miloš Hašan"
   ],
   "year": 2024,
   "venue": "Special Interest Group on Computer Graphics and Interactive Techniques Conference Conference Papers",
   "url": "https://doi.org/10.1145/3641519.3657445",
   "ids": {
    "doi": "10.1145/3641519.3657445"
   },
   "license": null,
   "provenance": {
    "title": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145%2F3641519.3657445",
     "checked_at": "2026-12-02T02:40:24.869Z"
    },
    "authors": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145%2F3641519.3657445",
     "checked_at": "2026-12-02T02:40:24.869Z"
    },
    "year": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145%2F3641519.3657445",
     "checked_at": "2026-12-02T02:40:24.869Z"
    },
    "venue": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145%2F3641519.3657445",
     "checked_at": "2026-12-02T02:40:24.869Z"
    },
    "url": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145%2F3641519.3657445",
     "checked_at": "2026-12-02T02:40:24.869Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-12-02T02:40:24.869Z",
   "title_sim": 1,
   "__bib": "zeng2024image"
  }
 ],
 "presets": [
  {
   "id": "rgb-x-intrinsic-decomposition-live",
   "title": "RGB↔X — RGB beauty / Albedo / Roughness / Irradiance intrinsic channel decomposition",
   "runtime": "glsl-fragment",
   "params": {
    "P_MODE": 0,
    "P_LIGHT_ANG": 0.6
   },
   "basis": "original",
   "license_note": "MIT — written for this index.",
   "code": "const float P_MODE = 0.0; // P Channel (0=Split,1=Alb,2=Rough,3=Irr) [0.0, 3.0, 1.0]\nconst float P_LIGHT_ANG = 0.6; // P Light Azimuth [0.0, 6.28, 0.05]\n\nvoid mainImage(out vec4 fragColor, in vec2 fragCoord) {\n  vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;\n  float sx = fragCoord.x / max(iResolution.x, 1.0);\n  vec3 ro = vec3(0.0, 0.15, 2.5);\n  vec3 rd = normalize(vec3(uv, -1.5));\n  float b = dot(ro, rd), c = dot(ro, ro) - 0.72 * 0.72;\n  float disc = b * b - c;\n  vec3 bg = vec3(0.06, 0.07, 0.10);\n  vec3 rgb = bg, alb = bg, rgh = bg, irr = bg;\n  if (disc > 0.0) {\n    float t = -b - sqrt(disc);\n    vec3 p = ro + rd * t;\n    vec3 n = normalize(p);\n    float band = smoothstep(-0.08, 0.08, sin(p.y * 10.0 + p.x * 4.0));\n    alb = mix(vec3(0.76, 0.34, 0.20), vec3(0.22, 0.48, 0.64), band);\n    float roughVal = mix(0.18, 0.82, band);\n    rgh = vec3(roughVal);\n    vec3 lDir = normalize(vec3(cos(P_LIGHT_ANG + iTime * 0.35), 0.75, sin(P_LIGHT_ANG + iTime * 0.35)));\n    float diff = max(dot(n, lDir), 0.0);\n    irr = vec3(0.22, 0.26, 0.36) + vec3(1.15, 0.96, 0.78) * diff;\n    float spec = pow(max(dot(n, normalize(lDir - rd)), 0.0), mix(96.0, 8.0, roughVal));\n    rgb = alb * irr + vec3(0.95) * spec * (1.0 - roughVal * 0.75);\n  }\n  int m = int(floor(P_MODE + 0.5));\n  vec3 outC = (m == 1) ? alb : (m == 2 ? rgh : (m == 3 ? irr : (sx < 0.25 ? rgb : (sx < 0.50 ? alb : (sx < 0.75 ? rgh : irr)))));\n  if (m == 0) {\n    float d1 = min(abs(sx - 0.25), min(abs(sx - 0.50), abs(sx - 0.75)));\n    outC = mix(outC, vec3(0.95), smoothstep(0.003, 0.001, d1));\n  }\n  outC = (outC * (2.51 * outC + 0.03)) / (outC * (2.43 * outC + 0.59) + 0.14);\n  fragColor = vec4(pow(clamp(outC, 0.0, 1.0), vec3(1.0 / 2.2)), 1.0);\n}",
   "execution_fidelity": "conceptual-diagram",
   "proof": {
    "kind": "rendered",
    "label": "rendered 2026-12-02",
    "ok": true,
    "proof": {
     "ok": true,
     "technique": "rgb-x-intrinsic-decomposition",
     "runtime": "glsl-fragment",
     "checked_at": "2026-12-02T02:47:19.059Z",
     "execution_fidelity": "conceptual-diagram",
     "benchmark_eligible": false,
     "renderer": "Chromium 145.0.7632.6 headless, WebGL2 via ANGLE/SwiftShader, 512×512, iTime∈{0.0,1.5,4.0}",
     "stats": {
      "mean": 0.5764,
      "std": 0.2356,
      "unique_colors": 155,
      "nan_pixels": 0,
      "animated": true,
      "anim_delta": 0.0352
     },
     "image": "/specimens/rgb-x-intrinsic-decomposition-live.webp",
     "reason": null
    }
   }
  }
 ],
 "related": [
  "matfuse-diffusion-pbr",
  "disney-principled-brdf",
  "gs-ir-inverse-rendering"
 ],
 "extends": [
  "disney-principled-brdf"
 ],
 "supersedes": [],
 "combines_with": [],
 "provenance": {
  "prose": "original text written for this index (frontier expansion, authority-verified)",
  "sources_verified_at": "2026-12-02T02:40:24.869Z"
 },
 "solves": [],
 "authority": "Zeng et al., 2024",
 "url": "https://texelatlas.vercel.app/t/rgb-x-intrinsic-decomposition/",
 "execution_fidelity": "conceptual-diagram",
 "fidelity_label": "Visual Diagram",
 "benchmark_eligible": false
}