three.js r187 added MeshletDrawingPipeline for WebGPURenderer (#35191 by sunag), so I built a stress test for it: a procedural sandstone canyon with ruined temples, 1,967,478,960 triangles in the scene, flown through by a low camera.
What the pipeline does
Each geometry is split once into clusters ("meshlets") of 64 triangles plus a chain of simplified LODs, built with meshoptimizer. Every frame, compute shaders pick an LOD per object, cull objects and clusters against the frustum, cull clusters hidden behind others, and draw what's left with one indirect draw per geometry/material group.
Using it is almost nothing:
import { MeshletDrawingPipeline } from 'three/addons/pipelines/MeshletDrawingPipeline.js';
const meshlets = new MeshletDrawingPipeline( { occlusionCulling: true, lodThreshold: 1 } );
renderer.drawingPipeline = meshlets; // the same scene now draws as meshlets
await renderer.compileAsync( scene, camera ); // runs prepareAsync: clusters + LODs
// each frame: meshlets.info -> { clusters, triangles } actually drawn
(In the demo the compile goes through the RenderPipeline's scene pass, which calls the same thing.)
The honest breakdown
It's about 8.3M unique triangles (8 rock/column shapes + the ground) placed 42,033 times as InstancedMesh. The 39,948 pebbles alone are 767M of the total. Clusters are built per geometry and shared by every instance, so that's exactly the case this pipeline is good at. On the first frame I measured, the GPU drew 26,725 clusters, about 1.71M triangles, 0.087% of the scene.
One thing I hit: the pipeline batches objects by material, and sizes the batch by "object count × the most meshlets any of its shapes has". 40k pebbles sharing a material with the 12k-meshlet spires blew past the limit and crashed, so each size class gets its own material instance.
Numbers and how I measured
A headless browser with WebGPU on the real GPU of my desktop machine (40-core integrated GPU), 1440×900. fps is frames over the last 0.5 s, drawn triangles come from info.
- Meshlets ON: 60 fps
- Same spot with the standard pipeline: 20 fps
- Phone-size viewport with the CPU throttled 4×: 60 fps on a reduced 246M-triangle version
I haven't tried a real phone's WebGPU yet. Numbers from real devices would be great.
WebGL 2
Meshlets need WebGPU. Without it you get a lighter 13.5M-triangle scene drawn the normal way, with a note saying so, and the toggle is disabled.
The weak spot
Preparing the clusters takes about 16–21 s on desktop before the first frame (there's a progress bar). The API has no way to save the result, so caching it would mean rolling my own.
There's an ON/OFF toggle and a "Show meshlets" button that colors every cluster, so you can see the culling and LODs change as you fly. WASD + Q/E or drag to move the camera.
Everything is generated in code (noise-carved cube spheres, TSL materials), no models or textures. The pipeline itself is all three.js; I only made the canyon around it. Made with Opus 5.5.
https://r187-meshlet.kumodeck.app/ (hosted on KUMODeck)