Skip to content
fr

Game-engine virtualized geometry, in the browser

Trillion3D

Trillion3D is a real-time rendering engine for the web built by Alban Pasquelin: a native Rust compiler splits 3D models into clusters of 128 triangles, and a WebGPU engine in TypeScript, with a WebGL2 fallback, streams them under a fixed memory budget with GPU-driven culling, temporal antialiasing and dynamic lighting.

import { Rust, TypeScript, WebGPU, WebGL2 } from '@/stack'
export function createWorld(canvas: HTMLCanvasElement): World {

The best game engines can draw scenes of billions of triangles: geometry is split into small clusters, and each frame only what is actually visible is loaded and drawn. None of that existed for the browser. Trillion3D builds it for the web's constraints — no hardware ray tracing, bounded GPU memory, one frame at a time — from the published literature alone.

const pages = await compiler.prepare(source) /** Rust: 128-triangle clusters, one DAG **/

The work is split in two. A native Rust compiler reads the industry formats — glTF, FBX, OBJ, USD, Alembic, Blender, Maya, Unity — and cuts them once and for all into compressed pages. In the browser, a WebGPU engine picks the level of detail every frame, discards what is hidden, and draws the whole scene in six commands at most.

gpu.cull(frustum, hiZ).drawIndirect({ maxCommands: 6 }).resolve(taa)

No number is claimed without a measurement. An automated bench compares each version with the previous one, and with the same render done in plain Three.js, from the same viewpoints and under the same budget. A still camera redraws zero pages: measured, not assumed.

bench.compare(before, after, threeJs) /** no claim outlives its measurement **/
return {
trianglesPerCluster: 128, /** triangles per cluster **/
drawCommandsPer: 6, /** draw commands per frame, at most **/
pagesRedrawnWith: 0, /** pages redrawn with a still camera **/
}
}

Projects

Audience measurement

With your permission, Google Analytics uses cookies to measure visits and interactions with this site. Information typed in the form and terminal is not sent to Google. Your choice is saved for 6 months and can be changed using “Cookies” at the bottom of the page.

How Google uses data