https://github.com/suous/splatfield
A simple pure Rust 3D Gaussian Splatting viewer.
https://github.com/suous/splatfield
3dgs cubecl egui wasm wgpu
Last synced: about 2 months ago
JSON representation
A simple pure Rust 3D Gaussian Splatting viewer.
- Host: GitHub
- URL: https://github.com/suous/splatfield
- Owner: suous
- License: mit
- Created: 2026-04-25T04:25:32.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-05-21T07:16:38.000Z (2 months ago)
- Last Synced: 2026-05-21T09:51:25.742Z (2 months ago)
- Topics: 3dgs, cubecl, egui, wasm, wgpu
- Language: Rust
- Homepage: https://suous.github.io/splatfield/
- Size: 3.68 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SplatField
A simple pure Rust 3D Gaussian Splatting viewer — under 1.3K lines of code.
Should show demo.
Built with [egui](https://github.com/emilk/egui), [wgpu](https://github.com/gfx-rs/wgpu), and [cubecl](https://github.com/tracel-ai/cubecl).
Built to learn the details of [3D Gaussian Splatting](https://arxiv.org/abs/2308.04079). Learned a lot from [Brush](https://github.com/ArthurBrussee/brush).
## Docs
| Doc | Description |
|-----|-------------|
| [Pipeline](docs/00_pipeline.md) | 3DGS forward pipeline overview, data structures, and rendering stages |
| [Projection](docs/01_project.md) | 3D covariance, local affine approximation, and 2D covariance projection |
| [Rasterization](docs/02_rasterization.md) | Tile-based dispatch, per-pixel evaluation, and alpha compositing |
### Interactive Diagrams
| Diagram | Description |
|---------|-------------|
| [Tile Intersection](https://suous.github.io/splatfield/intersects.svg) | Drag to reshape the Gaussian and see tile coverage change |
| [Alpha Compositing](https://suous.github.io/splatfield/compositing.svg) | Drag splats, adjust opacity and depth order, inspect pixel blending |
## Architecture
6 GPU kernel passes per frame:
1. **Project** — 3D to 2D projection, covariance, SH color, tile intersections
2. **Depth sort** — radix sort by depth
3. **Remap** — apply depth ordering to intersection IDs
4. **Tile sort** — sort intersections by tile
5. **Tile ranges** — build per-tile `[start, end)` ranges
6. **Rasterize** — front-to-back alpha blend to RGBA8 bitmap
```bash
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Language Files Lines Code Comments Blanks
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Rust 10 1446 1274 7 165
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Total 10 1465 1274 23 168
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
```