pissang / mutracer
git clone https://github.com/pissang/mutracer.git
v0.1.3 · 4d ago
WebGPU physically based path tracer for the web
+5
stars, 24h · #5,821
+~56
stars, 7 days · #3,610
+134
stars, 30 days · #5,507
134
★ total · +56% this week
17
forks · 2 open issues
Star history (as recorded here)
LanguageTypeScript
LicenseMIT
Created2026-10-08 (15d ago)
Last pushtoday
Watchers0
OwnerUser
GitHub topics
Links
- GitHub: github.com/pissang/mutracer
- Homepage: https://mutracer.meimu-studio.com/
- Releases · Issues · Hacker News mentions
README excerpt
MuTracer **MuTracer** is a physically based path tracer for the web. It renders on WebGPU and falls back to WebGL 2, with OpenPBR materials, TinyBVH acceleration and denoising built in. Try the viewer. MuTracer is a 0.x library; APIs may change between minor releases. - **WebGPU first, WebGL 2 as fallback**: unidirectional progressive path tracing with next-event estimation and multiple importance sampling over rect, sphere, spot (with IES profiles), directional and HDR environment lights. Without WebGPU, the same code renders on WebGL 2. - **OpenPBR 1.1 surface**: F82 metals, anisotropic GGX specular and coat, fuzz, thin-film interference, dispersive transmission with absorption and volume scattering, subsurface scattering, emission and ray-marched height-field displacement. - **Interactive with millions of triangles**: a two-level BVH whose BLASes are built with binned SAH in parallel Workers (a JavaScript port of TinyBVH, or the TinyBVH WebAssembly builder with SBVH and CWBVH layouts). Moving instances only refits the TLAS. See performance. - **Low-noise sampling and denoising**: Owen-scrambled Sobol or blue-noise ZSobol sequences. Albedo- and normal-guided denoising with Intel Open Image Denoise (WebGPU) or a joint non-local means filter (WebGPU and WebGL 2), while the image converges or on the final frame. - **Incremental Three.js sync**: `THREESync` converts standard and physical materials, lights, instancing, skinning and morph targets, and picks up transform, material and light edits on every update without reconverting the scene. - **Offline-quality output**: deterministic `converge()` with variance-driven adaptive sampling (WebGPU); AgX, ACES, Cineon, Reinhard and linear tone mapping, color grading, bloom, thin-lens depth of field, shadow catchers and transparent backgrounds. ## Gallery Rendered live in the browser. Click an image to open the scene in the viewer. Yamaha MT-09 · metal and coat · VTX , CC-BY-NC-SA 4.0 Super Human · subsurface skin · Davyd Vidiger , CC-BY 4.0 Gelatinous Cube · transmission · glenatron , CC-BY-NC 4.0 Dragon · glass · Delatronic , CC-BY 3.0 Blender Cover Remix · characters · bandinopla , CC-BY 4.0 Material spheres · OpenPBR layers · procedural, CC0 ## Performance The LEGO Technic Bugatti Chiron ( VTX , CC-BY-NC-SA 4.0) is a heavy scene that path traces interactively in the viewer: | | Bugatti Chiron | | --- | --- | | Rendered triangles | 4.6 M (2.5 M unique, 341 geometries in 560 meshes) | | Materials | 35 | | Download | 12.8 MB `.glb` | | BVH build, 1 thread | 1.7 s (built-in builder) / 1.0 s (TinyBVH WebAssembly) | | BVH build, 4 workers (default) | 0.50 s (built-in builder) / 0.28 s (TinyBVH WebAssembly) | | 1920 × 1080, 64 spp | 12.1 s path tracing, 12.4 s with OIDN denoising | Measured on an Apple M4 Max: rendering in Chrome with WebGPU at the viewer's default settings (6 bounces), BVH builds on CPU threads excluding worker startup. ## Install [code] Install `three` to l