A desktop 3D Gaussian Splatting renderer written in Rust with wgpu, winit, and egui.
The renderer loads a PLY Gaussian scene, computes per-frame camera-space depth on the GPU, sorts splats with a GPU radix sorter, and draws the result through a WebGPU render pipeline. A small egui overlay exposes camera controls and live performance information.
- Native desktop window powered by
winit - WebGPU rendering through
wgpu - 3D Gaussian Splatting draw path with spherical harmonic color coefficients
- GPU depth computation and GPU radix sorting for back-to-front splat rendering
- PLY loader for:
- 3DGS-style PLY files with
f_dc_*, optionalf_rest_*,opacity,scale_*, androt_*properties - Basic point cloud PLY files with
x,y,z, and optional RGB color properties
- 3DGS-style PLY files with
- Interactive camera movement
- egui panels for camera position/rotation and performance stats
- Rust toolchain with edition 2024 support
- A GPU and graphics driver supported by
wgpu - macOS, Windows, or Linux with the platform dependencies required by
wgpu/winit
Clone the repository, then run the app from the project root:
cargo runThe current default scene is loaded from:
resource/Raspberry/scene.ply
To use a different scene, change the path passed to load_gaussians_from_ply in src/renderer.rs.
W: move forwardS: move backwardA: move leftD: move right- Hold left mouse button and drag: look around
- Camera panel: edit position and rotation directly
- Reset button: restore the default camera
Run the test suite:
cargo testCheck compilation without running the app:
cargo checksrc/
main.rs Application entry point
app.rs winit application lifecycle
app_state.rs Window, egui, renderer, and frame orchestration
wgpu_context.rs wgpu surface/device/queue setup
renderer.rs Main renderer, GPU resources, input, and render loop
renderer/
camera.rs Camera math and uniform layout
gaussian.rs Gaussian data model and GPU storage layout
resource/
ply_loader.rs ASCII and binary little-endian PLY loader
ui/ egui widgets and performance overlay
shaders/
gaussian.wgsl Gaussian splat rendering shader
gaussian_depth.wgsl Depth compute shader
third_party/wgpu_sort/ Local GPU radix sort dependency
resource/ Sample PLY scenes and licenses
The loader requires vertex positions named x, y, and z.
For full 3D Gaussian Splatting data, the loader expects:
- DC color coefficients:
f_dc_0,f_dc_1,f_dc_2 - Optional higher-order SH coefficients:
f_rest_0throughf_rest_44 - Opacity:
opacity - Log scale:
scale_0,scale_1,scale_2 - Quaternion rotation:
rot_0,rot_1,rot_2,rot_3
For basic point clouds, RGB properties can be named either red/green/blue or r/g/b. If no color is present, points are rendered white with a small default scale.
Supported PLY formats:
ascii 1.0binary_little_endian 1.0
- If the app fails to start with an adapter or surface error, verify that your GPU driver supports the backend selected by
wgpu. - If scene loading fails, confirm that the PLY file exists at the configured path and includes
x,y, andzvertex properties. - Large scenes may require a GPU with sufficient storage buffer limits. The renderer requests adapter limits for large buffers during device creation.
