GaussianShader: Reflective 3D Gaussian Splatting
Equips 3D Gaussians with a simplified shading function—combining diffuse tint, roughness, a learned environment map, and a residual color term—to accurately reconstruct chrome, glass, and glossy surfaces.
Also known as GaussianShader
In the family Capture, reconstruction & splatting, splatting
Where it runs
Built inOfficial add-onPluginNone foundNot researched
| Engine | Support | How |
|---|---|---|
| three.js r187 | None found | Research PyTorch reflective Gaussian splat shader; no built-in engine primitive. |
| Babylon.js 9.x | None found | Research PyTorch reflective Gaussian splat shader; no built-in engine primitive. |
| Godot 4.7 | None found | Research PyTorch reflective Gaussian splat shader; no built-in engine primitive. |
| Unity 6.0 | None found | Research PyTorch reflective Gaussian splat shader; no built-in engine primitive. |
| Unreal 5.7 | None found | Research PyTorch reflective Gaussian splat shader; no built-in engine primitive. |
| Blender 5.0 | None found | Research PyTorch reflective Gaussian splat shader; no built-in engine primitive. |
| WebGPU W3C | None found | Research PyTorch reflective Gaussian splat shader; no built-in engine primitive. |
| Metal | None found | Research PyTorch reflective Gaussian splat shader; no built-in engine primitive. |
How it works
Low-order spherical harmonics in vanilla 3DGS cannot capture sharp view-dependent reflections on glossy metals or car paint. GaussianShader predicts each Gaussian's shortest-axis normal (refined with a residual normal vector) and evaluates a differentiable environment cubemap lookup modulated by specular tint and roughness, plus a small residual SH term for inter-reflections. A normal consistency loss links shortest-axis normals to depth gradients, yielding sharp reflections at interactive frame rates.
When to choose it
Use when capturing glossy, metallic, or reflective objects (vehicles, ceramics, wet scenes) where standard 3DGS turns reflections into blurry floating clouds.
Field marks
- Distant environment map assumes far-field reflections and misses sharp near-field self-reflections
- Shortest-axis normal heuristic becomes ambiguous on nearly spherical Gaussians
Presets
GaussianShader — diffuse-only (left) vs reflective residual environment shading (right)
{
"P_ROUGH": 0.18,
"P_RESIDUAL": 0.85,
"P_SPLIT": 0.5
}Show GLSL (41 lines)
const float P_ROUGH = 0.18; // P Specular Roughness [0.04, 0.70, 0.02]
const float P_RESIDUAL = 0.85; // P Residual Specular Gain [0.0, 1.5, 0.05]
const float P_SPLIT = 0.50; // P Diffuse / GaussianShader [0.0, 1.0, 0.02]
vec3 envSample(vec3 r) {
float h = clamp(r.y * 0.5 + 0.5, 0.0, 1.0);
vec3 sky = mix(vec3(0.10, 0.14, 0.24), vec3(0.55, 0.72, 0.95), pow(h, 0.7));
float sun = pow(max(dot(r, normalize(vec3(0.55, 0.68, 0.48))), 0.0), 64.0);
float rim = pow(max(dot(r, normalize(vec3(-0.75, 0.25, -0.45))), 0.0), 24.0);
return sky + vec3(3.2, 2.5, 1.8) * sun + vec3(0.45, 0.85, 1.25) * rim;
}
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.0, 2.6);
vec3 rd = normalize(vec3(uv, -1.6));
float b = dot(ro, rd);
float c = dot(ro, ro) - 0.78 * 0.78;
float disc = b * b - c;
vec3 col = envSample(rd) * 0.45;
if (disc > 0.0) {
float t = -b - sqrt(disc);
vec3 p = ro + rd * t;
vec3 n = normalize(p);
// Perturb with anisotropic splat micro-normal ripples
float a = iTime * 0.6;
vec3 pn = normalize(n + 0.06 * vec3(sin(p.y * 14.0 + a), cos(p.x * 14.0 - a), 0.0));
vec3 v = -rd;
vec3 r = reflect(-v, pn);
float ndv = max(dot(pn, v), 0.0);
float F = 0.04 + 0.96 * pow(1.0 - ndv, 5.0);
vec3 diffuse = vec3(0.18, 0.22, 0.28) * (0.35 + 0.65 * max(dot(pn, normalize(vec3(0.55, 0.68, 0.48))), 0.0));
vec3 envSpec = mix(envSample(r), envSample(pn), P_ROUGH * P_ROUGH) * F * P_RESIDUAL;
col = (sx < P_SPLIT) ? diffuse : (diffuse * (1.0 - F * 0.6) + envSpec);
}
float sep = smoothstep(0.0035, 0.001, abs(sx - P_SPLIT));
col = mix(col, vec3(0.95), sep);
col = (col * (2.51 * col + 0.03)) / (col * (2.43 * col + 0.59) + 0.14);
fragColor = vec4(pow(clamp(col, 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
- primaryYingwenqi Jiang, Jiadong Tu, Yuan Liu, Xifeng Gao, Xiaoxiao Long, Wenping Wang et al. (2023). GaussianShader: 3D Gaussian Splatting with Shading Functions for Reflective Surfaces. arXiv preprint.Verified via datacite-arxiv · 2026-12-02doi:10.48550/arxiv.2311.17977 · arXiv:2311.17977