The paris-mini-site-hero demo (FX.tsx, 'skyFog') built a compelling middle tier between 'no haze' and full aerial perspective, worth porting into the library:
Sky-colored exponential height fog. Classic analytic height-fog density (σ(h) = σ₀·e^(−h/H), closed-form optical depth along the ray, oblique-corrected distance), but the inscatter color is the baked sky cube sampled along the view ray — so distant geometry fades toward the actual sky behind it (sun-side glow, horizon gradient) instead of a constant color.
Costs one cube sample + a few ALU per pixel, and needs no per-frame AP LUT update — the cube already re-bakes only when sun/atmosphere change. What it can't do vs AP: per-channel transmittance (objects veil but never color-shift through the atmosphere), and no physical coupling to the atmosphere params beyond the cube's color.
Proposed API: sky.applyFog(sceneColorNode, { scenePass, density, heightFalloff }) or a mode: 'fog' option on applyHaze. Density/height should be live uniforms. The hero's implementation (ray reconstruction identical to the haze node's, isSky mask via linear depth) is a working reference.
🤖 Generated with Claude Code
The paris-mini-site-hero demo (FX.tsx, 'skyFog') built a compelling middle tier between 'no haze' and full aerial perspective, worth porting into the library:
Sky-colored exponential height fog. Classic analytic height-fog density (
σ(h) = σ₀·e^(−h/H), closed-form optical depth along the ray, oblique-corrected distance), but the inscatter color is the baked sky cube sampled along the view ray — so distant geometry fades toward the actual sky behind it (sun-side glow, horizon gradient) instead of a constant color.Costs one cube sample + a few ALU per pixel, and needs no per-frame AP LUT update — the cube already re-bakes only when sun/atmosphere change. What it can't do vs AP: per-channel transmittance (objects veil but never color-shift through the atmosphere), and no physical coupling to the atmosphere params beyond the cube's color.
Proposed API:
sky.applyFog(sceneColorNode, { scenePass, density, heightFalloff })or amode: 'fog'option on applyHaze. Density/height should be live uniforms. The hero's implementation (ray reconstruction identical to the haze node's, isSky mask via linear depth) is a working reference.🤖 Generated with Claude Code