Cosmic Particles
Explore particle computation and real-time graphics.
Demonstrates hands-on learning across systems code, GPU resources, shader logic, and real-time visual output.
The problem
GPU computation is easier to reason about when its behavior becomes visible. This experiment explores how a Rust application can update particles and render their movement with persistent trails.
The approach
A native Rust application uses wgpu for GPU resources and pipelines, winit for window handling, and WGSL shaders for particle updates and rendering. The documented design separates computation, trails, drawing, and presentation.
- Native Rust window and GPU resource setup
- Particle position and velocity updates in shader-accessible data
- Procedural color and glow experiments
- Intermediate textures for fading trails
Follow the flow.
Select a stage to explore its role. This diagram explains the documented design; it is not live infrastructure.
Particle state
Structured position and velocity data provides input to the GPU computation.
The decisions behind it.
Explore compute and rendering separately
The project makes their different responsibilities visible through separate stages of the documented frame flow.
Retain history through intermediate textures
The described ping-pong texture approach fades previous frames to produce trails rather than storing an unbounded particle history.
Keep the project experimental
The README presents an intended architecture and explicitly calls for checking runtime behavior against the current source.
What the evidence supports.
The repository includes screenshots, a recorded demo, and Cargo formatting/check commands. Compilation and a recorded visual are not a frame-rate benchmark or proof of cross-platform rendering correctness.
Current boundaries
- This is an introductory graphics experiment, not a production rendering engine.
- GPU behavior depends on hardware, drivers, surface configuration, and resource lifetimes.
- The documented flow is illustrative; there are no published measured FPS or particle-capacity results here.
What comes next.
- Record hardware and workload before measuring frame time.
- Validate resize behavior and texture recreation on supported systems.