RGB↔X: Diffusion Intrinsic Decomposition & Neural Rendering
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.
Also known as RGB-X, RGB<->X
In the family Generative & learned 3D, materials
Where it runs
Built inOfficial add-onPluginNone foundNot researched
| Engine | Support | How |
|---|---|---|
| three.js r187 | None found | Offline diffusion intrinsic decomposition/relighting model; import extracted PBR texture maps. |
| Babylon.js 9.x | None found | Offline diffusion intrinsic decomposition/relighting model; import extracted PBR texture maps. |
| Godot 4.7 | None found | Offline diffusion intrinsic decomposition/relighting model; import extracted PBR texture maps. |
| Unity 6.0 | None found | Offline diffusion intrinsic decomposition/relighting model; import extracted PBR texture maps. |
| Unreal 5.7 | None found | Offline diffusion intrinsic decomposition/relighting model; import extracted PBR texture maps. |
| Blender 5.0 | None found | Offline diffusion intrinsic decomposition/relighting model; import extracted PBR texture maps. |
| WebGPU W3C | None found | Offline diffusion intrinsic decomposition/relighting model; import extracted PBR texture maps. |
| Metal | None found | Offline diffusion intrinsic decomposition/relighting model; import extracted PBR texture maps. |
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 choose it
Choose for single-photo PBR extraction, neural relighting, material replacement in real photos, or turning rough G-buffer renders into photorealistic look-dev concepts.
Field marks
- 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
Presets
RGB↔X — RGB beauty / Albedo / Roughness / Irradiance intrinsic channel decomposition
{
"P_MODE": 0,
"P_LIGHT_ANG": 0.6
}Show GLSL (35 lines)
const float P_MODE = 0.0; // P Channel (0=Split,1=Alb,2=Rough,3=Irr) [0.0, 3.0, 1.0]
const float P_LIGHT_ANG = 0.6; // P Light Azimuth [0.0, 6.28, 0.05]
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;
float sx = fragCoord.x / max(iResolution.x, 1.0);
vec3 ro = vec3(0.0, 0.15, 2.5);
vec3 rd = normalize(vec3(uv, -1.5));
float b = dot(ro, rd), c = dot(ro, ro) - 0.72 * 0.72;
float disc = b * b - c;
vec3 bg = vec3(0.06, 0.07, 0.10);
vec3 rgb = bg, alb = bg, rgh = bg, irr = bg;
if (disc > 0.0) {
float t = -b - sqrt(disc);
vec3 p = ro + rd * t;
vec3 n = normalize(p);
float band = smoothstep(-0.08, 0.08, sin(p.y * 10.0 + p.x * 4.0));
alb = mix(vec3(0.76, 0.34, 0.20), vec3(0.22, 0.48, 0.64), band);
float roughVal = mix(0.18, 0.82, band);
rgh = vec3(roughVal);
vec3 lDir = normalize(vec3(cos(P_LIGHT_ANG + iTime * 0.35), 0.75, sin(P_LIGHT_ANG + iTime * 0.35)));
float diff = max(dot(n, lDir), 0.0);
irr = vec3(0.22, 0.26, 0.36) + vec3(1.15, 0.96, 0.78) * diff;
float spec = pow(max(dot(n, normalize(lDir - rd)), 0.0), mix(96.0, 8.0, roughVal));
rgb = alb * irr + vec3(0.95) * spec * (1.0 - roughVal * 0.75);
}
int m = int(floor(P_MODE + 0.5));
vec3 outC = (m == 1) ? alb : (m == 2 ? rgh : (m == 3 ? irr : (sx < 0.25 ? rgb : (sx < 0.50 ? alb : (sx < 0.75 ? rgh : irr)))));
if (m == 0) {
float d1 = min(abs(sx - 0.25), min(abs(sx - 0.50), abs(sx - 0.75)));
outC = mix(outC, vec3(0.95), smoothstep(0.003, 0.001, d1));
}
outC = (outC * (2.51 * outC + 0.03)) / (outC * (2.43 * outC + 0.59) + 0.14);
fragColor = vec4(pow(clamp(outC, 0.0, 1.0), vec3(1.0 / 2.2)), 1.0);
}Attribution: MIT — written for this index.
Measured GPU weight
Not yet timed in the standardized NVIDIA T4 sweep. Run the browser profiler above, or time all live specimens at 1080p in Google Colab (NVIDIA T4).
Lineage
Sources
- primaryZheng Zeng, Valentin Deschaintre, Iliyan Georgiev, Yannick Hold-Geoffroy, Yiwei Hu, Fujun Luan et al. (2024). RGB↔X: Image decomposition and synthesis using material- and lighting-aware diffusion models. Special Interest Group on Computer Graphics and Interactive Techniques Conference Conference Papers.Verified via crossref · 2026-12-02doi:10.1145/3641519.3657445