render-gaussian-splatsOfficial · by ShadereraGaussian splats
3D Gaussian splats (.splat and 3DGS .ply) rendered on host.gpu with EWA splatting, sorted back to front deterministically every frame, the frame as a premultiplied GPU texture layer; raw WebGPU, no packages.
“Use the shaderera-plugins skill to add render-gaussian-splats to this film and wire it in, then run check and show me a still.”
- Type
- component · Rendering
- Version
- 0.1.0 · published
- Licence
- MIT
- Built on
- No other plugins
- npm
- No packages
- Copies
- Tags
- gaussian splatting, 3dgs, splats, ply, point cloud, radiance field, ewa, webgpu, wgsl, 3d, deterministic
How to
use it.
3D Gaussian splats from a .splat or 3DGS .ply file, drawn on the host's GPU with EWA splatting and returned as a layer, the same pixels for the same camera every time.
import { createSplatRenderer, loadSplats } from './render/splats.ts'// in openconst splats = createSplatRenderer(host.gpu!, { width: W, height: H }) // format 'rgba16float'splats.upload(await loadSplats(host, 'assets/garden.ply')) // or .splat// in render(t, options): the host's camera when it passes one, else the film's ownconst { view, projection } = options.camera ?? myCamera(t) // column-major Mat4sreturn [{ color: splats.render(view, projection), alpha: 'premultiplied' }]The layer is an rgba16float texture (or rgba8unorm with format) at the frame size, premultiplied alpha, transparent where there are no splats. Colours are as stored in the file (display values, no conversion, no grading). The texture is reused: composite or read it before the next render. Pass any view and projection in: column-major, the projection in WebGPU clip space (z 0–1). It needs no other plugin; camera-keyframes' matricesOf(shot, W / H) gives both.
- Formats:
.splat(32 bytes a splat) and binary little-endian.plyfrom 3DGS training (parseSplat,parsePly, orparseSplats, which reads the header). Splats are plain typed arrays: build or edit them in code beforeupload. - Spherical harmonics degree 0 only:
f_dcis read,f_restis ignored, so colours do not change with the view angle. - The depth sort runs on the CPU every
render: a stable radix sort of Float32 view depths, ties in splat order, O(N), about 20 ms a frame for 1M splats on a desktop CPU. Splats behind the camera are left out. - 64 bytes a splat in one storage buffer, up to the device's
maxStorageBufferBindingSize: the Shaderera hosts ask for the adapter's maximum (2 GB, about 33M splats, on an NVIDIA Blackwell), WebGPU's default is 128 MiB (about 2.1M);uploadsays so when a file is larger. - No depth output for the host's depth test: the layer composites
over.
More in Rendering
render-image-texturesOfficial · by ShadereraImage texturesArtwork and photos as three.js textures decoded identically in Node and the browser (pure-JS PNG and JPEG), an atlas of many images for instanced cards, and a tool that converts WebP, AVIF, GIF or video frames to PNG once.render-three-hostOfficial · by Shadererathree.js on the host GPUthree.js WebGPURenderer on host.gpu, deterministic: node clock set to t (never the wall clock), HDR scene tone-mapped and sRGB-encoded into the frame, handed to the host as a GPU texture layer with no copy; works in Node and the browser.