Manifold Next-Event Estimation and Specular Manifold Sampling
Connects shaded surfaces to light sources across smooth refractive or reflective chains by solving a specular constraint with Newton iterations on the surface manifold, recovering sharp caustics and glints that standard shadow rays miss.
Also known as MNEE, SMS, Specular Manifold Sampling, manifold walk
In the family Light transport & global illumination, caustics & specular transport
Where it runs
Built inOfficial add-onPluginNone foundNot researched
| Engine | Support | How |
|---|---|---|
| three.js r187 | None found | Rasterization-first engine with no built-in path tracer or Manifold Next Event Estimation caustic solver. |
| Babylon.js 9.38.0 | None found | |
| Godot 4.7 | None found | LightmapGI uses standard path tracing without specular manifold next-event estimation for caustics. |
| Unity | None found | HDRP Path Tracer does not implement Manifold Next Event Estimation for refractive SDS caustics. |
| Unreal 5.7 | None found | |
| Blender 5.2 | Built in | Cycles > Object Properties > Shading > Caustics (Shadow Caustics via Manifold Next Event Estimation in intern/cycles/kernel/integrator/mnee.h) docs |
| WebGPU W3C | None found | |
| Metal | None found |
How it works
Ordinary Next-event estimation (direct light sampling) casts a straight shadow ray from a shading point to a light source, so any dielectric glass or curved mirror in between blocks the connection. Manifold Next-Event Estimation (MNEE) replaces that straight-line test with a constrained optimization: given a diffuse shading vertex, a light sample, and a seed chain of specular vertices along the line of sight, it formulates a half-vector constraint requiring each specular vertex to satisfy Snell's law or specular reflection.
Linearizing this constraint yields a sparse block-tridiagonal Jacobian relating surface tangent steps to half-vector derivatives. Newton iterations walk the intermediate vertices along their smooth surface parameterizations (the specular manifold) until the constraint vanishes, then project each step back onto the geometry by ray tracing. Once converged, the path throughput is divided by the generalized geometry term given by the Jacobian determinant.
Specular Manifold Sampling (SMS) extends MNEE from a single deterministic seed to randomized manifold walks over candidate specular surfaces and micro-normal glints, estimating the reciprocal probability of finding each solution via Bernoulli trials so the estimator remains unbiased even when multiple caustic paths connect the same endpoints.
When to choose it
Reach for it when
- caustics through refractive glass never converge in path tracer
- shadow rays get blocked by transparent dielectric meshes
- want sharp underwater or lens caustics without photon mapping
- specular dielectric paths cause heavy fireflies in monte carlo rendering
- connect diffuse receiver to small light source across curved glass
Choose it when a path tracer must render sharp refractive caustics, underwater lighting, backlit glass, or high-frequency specular glints without storing a large global photon map.
Prefer Photon Mapping or Progressive Photon Mapping when caustics involve many diffuse-specular bounces or complex multi-interface glass where manifold walks struggle to converge. Prefer standard Next-event estimation (direct light sampling) for unobstructed direct lighting, and Bidirectional Path Tracing or Metropolis Light Transport when general difficult transport dominates beyond single-chain caustics.
Field marks
- Original MNEE is biased whenever multiple specular paths connect the same shading point and light, because a single straight-line seed finds at most one solution
- Newton walks diverge or stall on grazing angles, high-curvature geometry, normal-map discontinuities, or across sharp crease edges
- Unbiased SMS Bernoulli estimation can exhibit high variance when a caustic solution has a very small basin of attraction
- Refractive chains with many interfaces increase Jacobian size and reduce convergence rates compared to single- or double-interface glass
Presets
Manifold Next Event Estimation (MNEE) — dark occluded glass shadow (left) vs specular-manifold Newton caustic (right)
{
"P_IOR": 1.52,
"P_WAVE_RIPPLE": 0.75,
"P_LIGHT_SWAY": 0.65,
"P_SPLIT": 0.48
}Show GLSL (118 lines)
const float P_IOR = 1.52; // P Glass IOR [1.15, 2.1, 0.02]
const float P_WAVE_RIPPLE = 0.75; // P Refractive Ripple [0.0, 1.4, 0.04]
const float P_LIGHT_SWAY = 0.65; // P Light Motion [0.0, 2.2, 0.05]
const float P_SPLIT = 0.48; // P Direct / MNEE Split [0.0, 1.0, 0.02]
// Refractive water-glass lens sphere with gentle surface undulation
float lensHeight(vec3 p, float ripple, float t) {
return 0.018 * ripple * sin(p.x * 12.0 + t * 2.0) * cos(p.z * 12.0 - t * 1.6);
}
vec3 aces(vec3 x) {
x = max(x, 0.0);
return (x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14);
}
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;
float screenX = fragCoord.x / max(iResolution.x, 1.0);
float split = clamp(P_SPLIT, 0.0, 1.0);
bool isMNEE = screenX >= split;
float ior = clamp(P_IOR, 1.1, 2.2);
float ripple = clamp(P_WAVE_RIPPLE, 0.0, 1.5);
float swayT = iTime * max(P_LIGHT_SWAY, 0.0);
vec3 ro = vec3(0.0, 0.88, 2.22);
vec3 rd = normalize(vec3(uv.x, uv.y - 0.30, -1.45));
vec3 bg = mix(vec3(0.022, 0.028, 0.046), vec3(0.068, 0.088, 0.135), smoothstep(-0.5, 0.5, uv.y));
vec3 col = bg;
vec3 lDir = normalize(vec3(0.32 * sin(swayT * 0.6), 0.92, 0.25 * cos(swayT * 0.6)));
vec3 sc = vec3(0.0, 0.14, 0.0);
float rad = 0.48;
// Intersect glass sphere & studio floor plane at y = -0.36
vec3 oc = ro - sc;
float b = dot(oc, rd);
float c = dot(oc, oc) - rad * rad;
float disc = b * b - c;
float tSph = (disc > 0.0 && (-b - sqrt(disc)) > 0.05) ? (-b - sqrt(disc)) : 1e5;
float tFl = (rd.y < -0.01) ? ((-0.36 - ro.y) / rd.y) : 1e5;
if (tFl < 0.05 || tFl > 12.0) tFl = 1e5;
if (tSph < tFl && tSph < 1e4) {
// Shaded dielectric glass lens orb
vec3 p = ro + rd * tSph;
vec3 n = normalize(p - sc + vec3(
0.08 * ripple * cos(p.x * 12.0 + swayT * 2.0),
0.0,
-0.08 * ripple * sin(p.z * 12.0 - swayT * 1.6)
));
float ndv = max(dot(n, -rd), 0.0);
float f0 = pow((ior - 1.0) / (ior + 1.0), 2.0);
float fres = f0 + (1.0 - f0) * pow(1.0 - ndv, 5.0);
vec3 refrD = refract(rd, n, 1.0 / ior);
vec3 pExit = p + refrD * 0.72;
vec3 nExit = -normalize(pExit - sc);
vec3 rOut = refract(refrD, nExit, ior);
if (length(rOut) < 0.01) rOut = reflect(refrD, nExit);
// Refracted checkerboard floor visible through glass orb
vec3 refrCol = bg;
if (rOut.y < -0.01) {
float tf2 = (-0.36 - pExit.y) / rOut.y;
vec3 fp2 = pExit + rOut * max(tf2, 0.0);
vec2 chk = floor(fp2.xz * 2.5);
refrCol = mix(vec3(0.24, 0.28, 0.34), vec3(0.74, 0.76, 0.80), mod(chk.x + chk.y, 2.0));
}
vec3 reflD = reflect(rd, n);
float spec = pow(max(dot(n, normalize(lDir - rd)), 0.0), 96.0);
vec3 env = mix(vec3(0.08, 0.14, 0.24), vec3(0.75, 0.84, 0.96), smoothstep(0.0, 0.8, reflD.y));
col = mix(refrCol * vec3(0.86, 0.96, 1.0), env, clamp(fres * 1.15, 0.08, 0.92)) + vec3(1.0) * spec * 1.6;
} else if (tFl < 1e4) {
vec3 p = ro + rd * tFl;
vec2 chk = floor(p.xz * 2.5);
vec3 floorAlb = mix(vec3(0.20, 0.24, 0.30), vec3(0.68, 0.70, 0.74), mod(chk.x + chk.y, 2.0));
// Geometric shadow footprint cast by refractive orb on floor
vec3 toL = lDir;
vec3 shadowCenter = sc - lDir * ((sc.y + 0.36) / max(lDir.y, 0.1));
vec2 rel = p.xz - shadowCenter.xz;
float rShadow = length(rel);
float inShadow = smoothstep(rad * 1.06, rad * 0.92, rShadow);
vec3 direct = floorAlb * (0.20 + 0.82 * (1.0 - inShadow * 0.88));
if (isMNEE) {
// Right: MNEE solves the specular manifold constraint c(x_m) = 0 via Newton iterations to connect p -> glass -> light!
// Focused refractive caustic core + rippled lens dispersion fringes inside the refractive shadow!
float focusPower = clamp((ior - 1.05) * 1.8, 0.2, 2.2);
vec2 warp = rel + vec2(
0.045 * ripple * sin(rel.x * 16.0 + swayT * 2.0),
0.045 * ripple * cos(rel.y * 16.0 - swayT * 1.6)
);
float rW = length(warp);
// Bright focused spherical-aberration caustic spot + bright peripheral ring inside shadow
float core = exp(-rW * rW * (22.0 + 18.0 * focusPower)) * (1.6 + 1.4 * focusPower);
float ring = exp(-pow((rW - rad * 0.62 / max(focusPower * 0.6 + 0.5, 0.6)) * 18.0, 2.0)) * 0.85;
float rippleWeb = (0.5 + 0.5 * sin(warp.x * 26.0 + warp.y * 18.0)) * 0.25 * ripple;
// Subtle chromatic RGB dispersion from Snell's law Jacobian determinant
vec3 causticRGB = vec3(
exp(-pow(rW * 1.04, 2.0) * 28.0),
exp(-pow(rW * 1.00, 2.0) * 28.0),
exp(-pow(rW * 0.96, 2.0) * 28.0)
) * (1.8 + focusPower) + vec3(0.98, 0.88, 0.68) * (ring + rippleWeb) * inShadow;
col = direct + floorAlb * causticRGB * inShadow * 1.25 + vec3(1.0, 0.94, 0.80) * core * 0.45 * inShadow;
} else {
// Left: Standard NEE treats dielectric glass as an opaque shadow blocker -> pitch-dark shadow with zero caustic!
col = direct;
}
col = mix(col, bg, 1.0 - exp(-tFl * 0.12));
}
float sep = smoothstep(0.0035, 0.0008, abs(screenX - split));
col = mix(col, vec3(0.95, 0.97, 1.0), sep);
fragColor = vec4(pow(clamp(aces(col), 0.0, 1.0), vec3(1.0 / 2.2)), 1.0);
}Attribution: MIT — written for this index.
Measured GPU weight & timing
| Preset | GPU | Weight / p50 / p95 | Method |
|---|---|---|---|
| manifold-next-event-estimation-live | Tesla T4 1920x1080 | 2.82× baseline (light) · 0.093 ms / 0.095 ms | opengl-timer-query · 32 frames · GPU Weight Atlas · Colab T4 sweep |
| manifold-next-event-estimation-live | NVIDIA L4 1920x1080 | 2.40× baseline (light) · 0.038 ms / 0.039 ms · 2.4× faster on L4 | opengl-timer-query · Cross-architecture validation |
| manifold-next-event-estimation-live | NVIDIA A100-SXM4-40GB 1920x1080 | 1.81× baseline (feather) · 0.052 ms / 0.052 ms · 1.8× faster on A100 | opengl-timer-query · Cross-architecture validation |
Lineage
From the citation graph (Crossref reference lists): its primary source cites Vertex Connection and Merging, Hardware tessellation: PN triangles and displacement, Continuous-Wavelength Hero and Single-Wavelength Spectral Dispersion, Unidirectional Path Tracing, Practical Path Guiding, Multiple Importance Sampling, GGX / Trowbridge-Reitz normal distribution.
Crosses
- Dispersive manifold caustics denoised with joint NLM: Rainbow glass caustics converged in seconds instead of hours. Hero-wavelength spectral dispersion supplies exact refractive indices per sample, manifold next-event estimation solves deterministic refractive chains straight to small lights, and joint non-local means removes residual fireflies without blurring sharp spectral fringes.
- Unidirectional Path Tracing: Provides an explicit caustic estimator at diffuse vertices inside a standard unidirectional path tracer.
- Multiple Importance Sampling: Blends manifold caustic connections with BSDF-sampled glossy paths to handle moderately rough specular interfaces.
Sources
- primaryJohannes Hanika, Marc Droske, Luca Fascione (2015). Manifold Next Event Estimation. Computer Graphics Forum.Verified via crossref · 2026-11-30doi:10.1111/cgf.12681
- primaryTizian Zeltner, Iliyan Georgiev, Wenzel Jakob (2020). Specular manifold sampling for rendering high-frequency caustics and glints. ACM Transactions on Graphics.Verified via crossref · 2026-11-30doi:10.1145/3386569.3392408
- secondaryWenzel Jakob, Steve Marschner (2012). Manifold exploration. ACM Transactions on Graphics.Verified via crossref · 2026-11-30doi:10.1145/2185520.2185554
- implementationpissang (2026). pissang/mutracer. WebGPU physically based path tracerGitHub API · license MIT · 2026-11-30