n.nishant.dev
Workspace/Projects/Cosmic Particles
Built in the open
All projects
GPU EXPERIMENT / CASE STUDY

Cosmic Particles

Explore particle computation and real-time graphics.

Personal exploration · Rust GPU programmingExploratory project
RustwgpuWGSL
Source code
PROJECT WALKTHROUGH

Cosmic Particles demo

A recorded project demonstration. The player loads only while this dialog is open.

WHERE THIS CREATES VALUE

Demonstrates hands-on learning across systems code, GPU resources, shader logic, and real-time visual output.

01 / CONTEXT

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.

02 / IMPLEMENTATION

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
03 / ARCHITECTURE

Follow the flow.

Select a stage to explore its role. This diagram explains the documented design; it is not live infrastructure.

ARCHITECTURE EXPLORERDOCUMENTED DESIGN
STEP 1 / 4

Particle state

Structured position and velocity data provides input to the GPU computation.

04 / TRADEOFFS

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.

05 / EVIDENCE

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.
06 / NEXT STEPS

What comes next.

  • Record hardware and workload before measuring frame time.
  • Validate resize behavior and texture recreation on supported systems.
Read the project documentation
NEXT CASE STUDYNotification System