THREE.JS / FOUNDATIONS — WEBGPU FOG SCATTERING
Light softens the forest.
A bounded implementation of the official scattering contract: density fog, a downsampled Gaussian blur, and a fog-weighted composite over deterministic generated trees.
Initializing fog scattering—
Preparing the density graph and generated forest.
Study issue
- BACKEND
- —
- PIPELINE
- —
- FOG
- —
- FOREST
- —
- STATE
- —
- SAMPLE
- —
Scattering controlsTSL / REFERENCE
Fog scattering contract
Native WebGPU uses densityFogFactor from a reference to scene fog, a downsampled gaussianBlur of the scene pass, and mix(scenePassColor, sceneColorBlurred, fogFactor). WebGL2 keeps an explicit FogExp2 reference.
Derived from the pinned official WebGPU Fog Scattering example. This bounded study uses installed TreeGenerator geometry at a deterministic local scale and does not claim the official 156-tree forest, Inspector/FirstPersonControls presentation, exact page/pixels, arbitrary device/performance coverage, or whole-example fidelity.