A simple pure Rust 3D Gaussian Splatting viewer — under 1.3K lines of code.
demo.mp4
Built with egui, wgpu, and cubecl.
Built to learn the details of 3D Gaussian Splatting. Learned a lot from Brush.
| Doc | Description |
|---|---|
| Pipeline | 3DGS forward pipeline overview, data structures, and rendering stages |
| Projection | 3D covariance, local affine approximation, and 2D covariance projection |
| Rasterization | Tile-based dispatch, per-pixel evaluation, and alpha compositing |
| Diagram | Description |
|---|---|
| Tile Intersection | Drag to reshape the Gaussian and see tile coverage change |
| Alpha Compositing | Drag splats, adjust opacity and depth order, inspect pixel blending |
6 GPU kernel passes per frame:
- Project — 3D to 2D projection, covariance, SH color, tile intersections
- Depth sort — radix sort by depth
- Remap — apply depth ordering to intersection IDs
- Tile sort — sort intersections by tile
- Tile ranges — build per-tile
[start, end)ranges - Rasterize — front-to-back alpha blend to RGBA8 bitmap
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Language Files Lines Code Comments Blanks
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Rust 10 1446 1274 7 165
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Total 10 1465 1274 23 168
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━