A WebGPU Gaussian Splat viewer for three.js.
Docs and demo: https://vlam.voluma.ai · get started · guides
Local site and generated API: npm run dev http://localhost:5170
This is a pre-release not yet recommended for production. The API can still change in breaking ways before v1.0.
npm install @voluma/vlam threethree is a peer dependency (>= 0.186.0). See the migration guide for 0.x API changes.
import * as THREE from 'three/webgpu';
import { SplatMesh } from '@voluma/vlam';
import { loadSplatData } from '@voluma/vlam/loaders';
const renderer = new THREE.WebGPURenderer({ antialias: true });
renderer.setSize(innerWidth, innerHeight);
document.body.appendChild(renderer.domElement);
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(60, innerWidth / innerHeight, 0.01, 100);
camera.position.set(1, 0.5, 1.4);
camera.lookAt(0, 0, 0);
const splats = new SplatMesh(await loadSplatData('/scene.sog'));
scene.add(splats);
renderer.setAnimationLoop(() => {
splats.update(camera, renderer);
renderer.render(scene, camera);
});SplatMesh works with a regular three.js WebGPURenderer (including its
automatic WebGL2 fallback). For large streamed or unified scenes,
createWebGPURenderer() is an optional convenience that requests higher WebGPU
device limits and preserves MSAA where supported.
Supported formats: .sog, .ply, .spz, .splat, .ksplat, .lcc, .lcc2, .rad.
Optional proxy-mesh relighting is available from @voluma/vlam/relighting;
see the relighting guide. Support and remaining
device-validation gates are tracked separately in the
capability matrix and roadmap.
See CONTRIBUTING.md and docs/architecture.md. By participating you agree to the Code of Conduct. Security reports: see SECURITY.md.
MIT. Third-party notices: THIRD_PARTY_NOTICES.md.
Made by Voluma.