Texel A field guide to 3D techniques

Mip-Splatting × Froxel Volumetric Fog

Scale-consistent volumetric fog shafts through Mip-Splatting scenes. Alias-free Mip-Splatting captures gain crisp, depth-aware volumetric fog and sunbeams by injecting band-limited 3D splat opacity directly into a camera-aligned froxel volume instead of faking depth fog in post.

Open in StudioReproduced124× · 3.85 ms

Mip-SplattingCapture · Real-timein: photos, camera-poses, point-cloudout: gaussianscompositeFroxel Volumetric FogVolume · Real-timein: depth, volume-density, visibility-maskout: radiance, volume-density

Verified proof

reproduced · 2026-12-01texel-lablicense MIT
Specimen render of Mip-Splatting + froxel volumetric fog (left: aliased splats + flat depth fog, right: band-limited splats + froxel godrays)
Cross-proof specimen. Mip-Splatting + froxel volumetric fog (left: aliased splats + flat depth fog, right: band-limited splats + froxel godrays). Verified WebGL2 proof · 2026-12-01

Split-screen WebGL2 proof comparing raw un-band-limited 3D splats with flat post-process depth haze (left) against scale-consistent Mip-Splatting Gaussians injected into a frustum-aligned froxel volume to carve crisp volumetric sunbeams and occluded shadow shafts (right).

Chromium Headless ANGLE/SwiftShader WebGL2 · 512x512 · eliminates distant splat aliasing via 3D Mip-Splatting smoothing while carving depth-accurate occluded volumetric sunbeams in a froxel grid

Show GLSL proof (154 lines)
const float P_FOG_DENS = 0.92; // P Froxel Fog Density [0.2, 1.8, 0.05]
const float P_ANISO_G = 0.72; // P HG Phase Anisotropy [0.1, 0.9, 0.02]
const float P_MIP_BAND = 0.85; // P 3D Mip Clamp [0.0, 1.5, 0.05]
const float P_BEAM_ANGLE = 0.55; // P Sunbeam Sweep [0.0, 1.2, 0.05]

float hash21(vec2 p) {
  p = fract(p * vec2(127.1, 311.7));
  p += dot(p, p + 34.5);
  return fract(p.x * p.y);
}

// Evaluate 3D Gaussian splat colonnade density & shadow occlusion at point p
float evalSplatHall(vec3 p, float distToCam, bool useMipBand, out vec3 splatAlbedo) {
  // Repeating twin colonnade of stone pillars & thin hanging arch ribs
  float zCell = floor(p.z / 1.45 + 0.5);
  vec3 q = vec3(p.x, p.y, p.z - zCell * 1.45);
  float side = sign(q.x + 1e-5);
  vec3 colCenter = vec3(side * 1.05, clamp(q.y, -0.85, 1.15), 0.0);
  float dCol = length(q - colCenter) - 0.24;

  // Upper arch span & thin cross-braces (prone to aliasing without Mip-Splatting 3D smoothing)
  float archY = 1.15 + sqrt(max(0.0, 1.10 - q.x * q.x)) * 0.55;
  float dArch = length(vec2(q.y - archY, q.z)) - 0.14;
  float dRib = length(vec2(q.y - 0.65, q.z)) - 0.045;

  float dMin = min(dCol, min(dArch, dRib));
  // Floor & side clerestory walls
  float dFloor = p.y + 0.95;
  float dWall = 1.95 - abs(p.x);
  dMin = min(dMin, min(dFloor, dWall));

  // Mip-Splatting 3D smoothing kernel widens minimum Gaussian variance proportionally to camera distance
  float mipSigma = useMipBand ? (0.015 + 0.014 * distToCam * P_MIP_BAND) : 0.004;
  float splatDensity = exp(-max(dMin, 0.0) * max(dMin, 0.0) / max(mipSigma * mipSigma, 1e-5));
  if (dMin < 0.0) splatDensity = 1.0;

  // Unfiltered left side exhibits sub-pixel high-frequency splat sparkle on distant thin ribs
  if (!useMipBand && distToCam > 2.2) {
    float spark = step(0.45, hash21(floor(p.xy * 26.0 + p.z * 9.0)));
    if (dRib < 0.06) splatDensity *= spark;
  }

  vec3 stone = mix(vec3(0.48, 0.44, 0.39), vec3(0.32, 0.34, 0.38), step(0.5, mod(zCell, 2.0)));
  if (dFloor < 0.04) stone = mix(vec3(0.20, 0.22, 0.26), vec3(0.30, 0.32, 0.36), mod(floor(p.x * 2.0) + floor(p.z * 2.0), 2.0));
  splatAlbedo = stone;
  return splatDensity;
}

// Clerestory window mask + pillar shadow occlusion evaluated in froxel volume
float froxelSunVis(vec3 wp, vec3 sunDir) {
  // Cast short transmittance ray through the splat colonnade toward sun
  float vis = 1.0;
  for (int s = 1; s <= 5; s++) {
    vec3 sp = wp + sunDir * (float(s) * 0.42);
    vec3 dummyAlb;
    float occ = evalSplatHall(sp, 2.5, true, dummyAlb);
    // Clerestory openings between z-bays let bright sun shafts enter through the right wall
    if (abs(sp.x) > 1.82 && sp.y > 0.15 && sp.y < 1.35) {
      float bay = abs(fract(sp.z / 1.45 + 0.5) - 0.5);
      if (bay < 0.28) occ = 0.0;
    }
    vis *= (1.0 - occ * 0.62);
  }
  return clamp(vis, 0.0, 1.0);
}

float hgPhase(float c, float g) {
  float g2 = g * g;
  return (1.0 - g2) / (12.56637 * pow(max(1.0 + g2 - 2.0 * g * c, 1e-4), 1.5));
}

vec3 acesTone(vec3 x) {
  return clamp((x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14), 0.0, 1.0);
}

void mainImage(out vec4 fragColor, in vec2 fragCoord) {
  vec2 res = max(iResolution.xy, vec2(1.0));
  vec2 uvN = fragCoord / res;
  float splitX = iMouse.z > 0.0 ? clamp(iMouse.x / res.x, 0.05, 0.95) : 0.5;
  bool useFroxelMip = uvN.x > splitX;

  vec2 p = (fragCoord - 0.5 * res) / res.y;
  float t = iTime;
  vec3 ro = vec3(sin(t * 0.32) * 0.25, 0.05, 3.6 - mod(t * 0.35, 1.45));
  vec3 rd = normalize(vec3(p.x * 1.15, p.y + 0.04, -1.55));

  float sunSweep = 0.52 + 0.28 * sin(t * 0.45 * P_BEAM_ANGLE);
  vec3 sunDir = normalize(vec3(sunSweep, 0.62, -0.35));

  // Primary Mip-Splatting expected-depth & color march
  float hitDist = 11.5;
  vec3 surfCol = vec3(0.06, 0.08, 0.12);
  float accumA = 0.0;
  vec3 accumRGB = vec3(0.0);
  float dt = 0.12;
  for (int i = 0; i < 64; i++) {
    float dist = 0.35 + float(i) * dt;
    vec3 wp = ro + rd * dist;
    vec3 alb;
    float dens = evalSplatHall(wp, dist, useFroxelMip, alb);
    if (dens > 0.05) {
      // Quick central-difference splat normal
      vec3 dAlb;
      float gx = evalSplatHall(wp + vec3(0.03, 0.0, 0.0), dist, true, dAlb) - evalSplatHall(wp - vec3(0.03, 0.0, 0.0), dist, true, dAlb);
      float gy = evalSplatHall(wp + vec3(0.0, 0.03, 0.0), dist, true, dAlb) - evalSplatHall(wp - vec3(0.0, 0.03, 0.0), dist, true, dAlb);
      float gz = evalSplatHall(wp + vec3(0.0, 0.0, 0.03), dist, true, dAlb) - evalSplatHall(wp - vec3(0.0, 0.0, 0.03), dist, true, dAlb);
      vec3 N = normalize(-vec3(gx, gy, gz) + vec3(1e-4));
      float ndl = max(dot(N, sunDir), 0.0);
      float sh = froxelSunVis(wp + N * 0.06, sunDir);
      vec3 lit = alb * (vec3(0.14, 0.19, 0.28) + vec3(1.55, 1.28, 0.92) * ndl * sh);
      float a = clamp(dens * 0.72, 0.0, 1.0);
      accumRGB += (1.0 - accumA) * a * lit;
      accumA += (1.0 - accumA) * a;
      if (accumA > 0.5 && hitDist > 11.0) hitDist = dist;
      if (accumA > 0.96) break;
    }
  }
  surfCol = mix(vec3(0.05, 0.07, 0.11), accumRGB / max(accumA, 1e-4), accumA);

  vec3 col = surfCol;
  if (!useFroxelMip) {
    // Left baseline: flat exponential post-process depth fog with zero occluded light shafts
    float flatFog = 1.0 - exp(-hitDist * 0.22 * P_FOG_DENS);
    col = mix(surfCol, vec3(0.30, 0.35, 0.42), clamp(flatFog, 0.0, 0.92));
  } else {
    // Right: frustum-aligned exponential-Z froxel grid integrating occluded volumetric sunbeams up to splat depth
    float phase = hgPhase(dot(rd, sunDir), P_ANISO_G) * 6.5;
    vec3 inScat = vec3(0.0);
    float trans = 1.0;
    int slices = 24;
    float maxZ = min(hitDist, 10.5);
    float zPrev = 0.25;
    for (int k = 1; k <= 24; k++) {
      float frac = float(k) / float(slices);
      float zCurr = 0.25 * pow(maxZ / 0.25, frac);
      float dz = max(zCurr - zPrev, 0.01);
      float zMid = 0.5 * (zPrev + zCurr);
      vec3 fp = ro + rd * zMid;
      float sunVis = froxelSunVis(fp, sunDir);
      float heightFog = exp(-max(fp.y + 0.95, 0.0) * 0.48);
      float sigma = (0.14 + 0.16 * heightFog) * P_FOG_DENS;
      vec3 scatter = (vec3(1.55, 1.18, 0.74) * sunVis * (0.45 + phase) + vec3(0.12, 0.18, 0.28)) * sigma;
      float stepT = exp(-sigma * dz);
      inScat += trans * scatter * (1.0 - stepT) / max(sigma, 1e-4) * 0.65;
      trans *= stepT;
      zPrev = zCurr;
    }
    col = surfCol * trans + inScat;
  }

  col = acesTone(col * 1.08);
  if (abs(fragCoord.x - splitX * res.x) < 1.0) col = vec3(0.95, 0.93, 0.89);
  fragColor = vec4(pow(clamp(col, 0.0, 1.0), vec3(1.0 / 2.2)), 1.0);
}

Why they connect

Mip-Splatting outputs 3D band-limited Gaussians whose 3D smoothing filter adapts to sampling frequency so distant structures never sparkle or vanish. The hop to Froxel Volumetric Fog is composite: splat the band-limited Gaussians into both the primary color/expected-depth buffer and a low-resolution camera frustum voxel grid (froxels) to record coarse transmittance and shadow occlusion. Froxel Volumetric Fog then evaluates single-scattered in-scattering with Henyey-Greenstein phase, temporally reprojects froxel slices, integrates transmittance front-to-back, and composites fog accurately between foreground and background splat layers.

How to build it

Render the Mip-Splatting scene at full resolution while writing alpha-weighted median depth into a linear depth texture. In parallel, inject splat extinction bounds into a 160x90x64 frustum-aligned 3D texture (or tile-packed 2D atlas in WebGL2) using exponential depth slicing, clamping each splat's minimum 3D variance to the froxel cell width so thin wires and branches remain temporally stable. Evaluate directional and spot light shadows against a coarse splat transmittance shadow map, accumulate in-scattering + extinction along Z slices, and lookup the integrated fog slice at each pixel's splat depth during final compositing.

Field marks

  1. Semi-transparent splat edges produce ambiguous single-depth values, causing bright fog halos around blurred silhouettes.
  2. Coarse froxel depth slices leak volumetric light through thin captured walls unless shadow-map bias and froxel jitter are coupled.
  3. Temporal froxel reprojection leaves ghosting trails behind moving spotlights or rapid camera orbits.
  4. Double-fogging occurs if the original outdoor photographs already contained heavy atmospheric haze baked into splat colors.

Prior art

No prior art found on 2026-12-01.

Searches run (2)
  • arXiv: all:"Mip-Splatting" AND all:"volumetric fog"
  • GitHub repos: "mip-splatting" froxel fog