Skip to content

suous/splatfield

Repository files navigation

SplatField

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.

Docs

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

Interactive Diagrams

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

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
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 Language              Files        Lines         Code     Comments       Blanks
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 Rust                     10         1446         1274            7          165
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 Total                    10         1465         1274           23          168
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

About

A simple pure Rust 3D Gaussian Splatting viewer.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors