Creative Coding

Three.js r186 Turns Gaussian Splats Into First-Class Scene Objects

Spherical-harmonic view-dependent splats, raycasting and frustum culling, plus voxel cone tracing for global illumination and cascaded shadow maps on a new SunLight. The CommonJS build is on its way out.

Three.js releases arrive roughly monthly and most are housekeeping. r186, released September 8, is not one of those. It lands three things that change what’s practical in a browser: usable Gaussian splats, real-time global illumination, and better sunlight.

Splats you can actually build with

Gaussian splatting reached three.js a while ago, but in a limited form: you could display a captured scene, and not much else. r186 makes splats behave like the rest of the scene graph.

  • View-dependent appearance via spherical harmonics. Captured surfaces change with viewing angle, so reflections and sheen behave the way they did when captured, instead of looking like flat fuzz.
  • Raycasting against splats. You can now click, hover and hit-test a splat scene. This is the big one for interaction designers: a photoscanned environment stops being wallpaper and becomes something a user can touch.
  • Frustum culling. Splats outside the camera’s view stop costing you. Splat scenes are enormous, so this is the difference between a demo and something that holds frame rate on a laptop.

Taken together, a capture of a real place can now be a functioning interactive environment on the open web, with no app to install.

Lighting

SunLight with cascaded shadow maps is the standard technique for making one directional light produce crisp shadows nearby and sensible shadows far away, by splitting the view into distance bands. Anyone who has built a large outdoor scene in three.js has fought this problem by hand.

Voxel cone tracing (VXGI) brings approximate diffuse global illumination: light bouncing off a red wall tints the white floor beside it. Previously that meant baking lightmaps ahead of time or accepting flat lighting. Now it can respond to scenes that change.

Materials also gained retroreflectivity (surfaces like road signs and safety fabric that bounce light back toward its source) and improved energy conservation in diffuse and sheen lighting, which mostly shows up as things looking correct instead of subtly over-bright.

Post-processing and WebGPU

New nodes cover order-independent transparency, screen-space ambient occlusion and volumetric fog. OIT in particular fixes the long-standing mess of sorting overlapping transparent objects, which anyone rendering glass, smoke or layered particles has hit.

On the WebGPU side there’s compileComputeAsync() for compute shader compilation, a DirectRenderPipeline path, read-write storage buffers, and atomics outside compute stages. The Inspector picked up split-screen mode, a color-grading extension and a virtual-scrolling timeline.

What breaks

Two removals to plan for:

  • The CommonJS build is deprecated. Move to ES modules.
  • Minified builds are no longer distributed, so minification is your bundler’s job now.
  • PCFSoftShadowMap was removed, with migration warnings in place.

None of these are surprises if you’ve followed the project’s direction, but they will bite anyone updating from an old version in one jump.