Find your next open-source project

Search by name, purpose, or keyword, or paste a GitHub URL. Start with / to search agent skills (e.g. /pdf)

ericflo/webgpu-virtual-mesh

Developer ToolsFrontend

WebGPU geometry engine that streams micro-cluster LODs from static HTTP Range files to render 100M+ triangle scenes.

149
9
TypeScript
Apache-2.0
3 days old
+45 stars in 9h

What it does

webgpu-virtual-mesh is a TypeScript/WebGPU rendering engine for very large triangle scenes. Rather than loading multi-million-triangle meshes into VRAM up front, it generates a watertight cluster DAG (~128 triangles per cluster) offline, packs each level into independently decodable static files, and at runtime streams only the clusters the current camera actually needs into a bounded GPU arena. The demo worlds total 253.2M effective triangles, with a single world at 107.48M.

It is aimed at graphics engineers and technical artists who need photogrammetry or laser-scan scale geometry in a browser, and who are comfortable building and hosting their own assets. The claim of "zero server" comes from relying only on static hosting that supports HTTP Range requests, so there is no custom streaming backend.

The engine itself has no demo or world coupling and is importable from src/engine/index.ts; the five shipped worlds are sample scenes, not the library API.

How it works

An offline pipeline does the heavy lifting: a C++20 compiler (tools/vgm-builder) builds the cluster DAG and encodes VMZ8 meshlets, then a packer emits VGS1/VMS1 slices plus WMT1 metadata and WTX1 AVIF textures. At runtime 12 Web Workers fetch ranges from static files, decode them, and feed a shared 4 KB-granular GPU arena; rendering uses a single-pass visibility buffer with compute triangle culling, ping-pong Hi-Z, shadows and XeGTAO. The full binary formats and proofs are in ARCHITECTURE.md.

Quick start

Prerequisites: Node.js 20+, g++ with C++20/OpenMP, Python 3 with Pillow and pillow-avif-plugin, and a WebGPU-enabled browser.

npm install
npm run build:assets      # compile studio ground-truth sculpts
npm run build:canyon      # fetch & compile Sun Canyon world
npm run pack:static       # frontend + VGS1/WMT1/WTX1 pack into dist-static/
npm run serve

Then open http://127.0.0.1:4173 for the demo and http://127.0.0.1:4173/report/ for the interactive study. To compile a custom mesh, the README shows ./tools/vgm-builder/vgm-builder --input path/to/mesh.obj --out assets/my_mesh.vgm before packing. Previewing the hosted demo is possible without any local setup at the live demo.

The dist-static/ bundle is ~275 MB and can be deployed to any static host that supports HTTP Range; the provided npm run deploy targets NeuralColumn specifically.

Using the engine as a library

Import VirtualMeshRenderer, setStaticBasePath and the scene types from the engine, point the base path at a directory serving packed VGS1/WMT1/WTX1 files, register a scene factory, and call init() then loadAsset(). Custom material/lighting/sky behaviour is injected through WGSL shader hooks supplied at build time. See the library import entry and the README for the full VirtualMeshSceneDefinition shape.

Constraints and limits

  • Requires a WebGPU-enabled browser; the README targets Chrome, Edge and WebGPU-capable mobile browsers.
  • Static hosting must honor HTTP Range (206 Partial Content) requests, otherwise streaming degrades or fails. Chromium's per-URL sparse cache lock is worked around with a ?r=start-end query key scheme.
  • Building assets needs a C++20 compiler with OpenMP and Python image/AVIF tooling; it is not a pure-JS install.
  • Benchmark numbers (787.2 FPS steady, 0.9921 SSIM, etc.) are measured on AMD Radeon 8060S with Vulkan RADV over the static bundle, so performance will differ on other GPUs and networks.
  • The repo is Apache-2.0, but bundled photogrammetry and museum scans remain CC0/Public Domain under their own terms.

HotRepo's take

The project is very recent: it appeared in HotRepo's new-project ranking on 2026-12-05 with 11 stars gained during a roughly 90-minute window, reaching 115 stars and 7 forks. There is no daily all-language ranking recorded yet, so the data only supports the fact that it entered the new-project list that day, not a broader trend. What stands out is the unusually detailed in-repo documentation — architecture notes, an experiments journal, benchmark suites and a 23-minute explainer film — which gives readers enough to evaluate the technical approach without running the demo first.

Written by AI from the project's public information and HotRepo's records, updated . The project's own docs are the source of truth.

You might also like

  1. PlayGreg6Web/playGreg6webSelf-hosted experiment for running an Xbox Series game in a browser using Wasm64, WebGPU and HTTP range streaming.JavaScript106
  2. visgl/deck.glA GPU-powered WebGL2/WebGPU framework for building high-performance large-scale geospatial and data visualizations.TypeScript14,774
  3. airbnb/lottie-webRender Bodymovin-exported After Effects animations as JSON natively in web pages.JavaScript32,476
  4. stackedlol/ascii-sharksA zero-dependency TypeScript canvas engine that renders animated ASCII sharks and fish for ambient art and playful web pages.TypeScript808
  5. IfcOpenShell/IfcOpenShellAn open-source IFC library and geometry engine for software developers and AEC professionals working with building models.C++2,963