Skip to main content
Spectra
←Return to Field Journal
Journal/Graphics Engineering/WebGPU Compute Shaders: 200,000 Particles at 120 FPS
Graphics EngineeringField Dispatch••1 min read

WebGPU Compute Shaders: 200,000 Particles at 120 FPS

A technical breakdown of executing massively parallel particle physics directly on client GPUs using WebGPU compute passes and WGSL.

Kaelen Voss
Kaelen Voss
GPU Shader Architect
++++
SPECTRA LABS // FIG. 01Graphics Engineering
WebGPU Compute Shaders: 200,000 Particles at 120 FPS
TOPICS:#WebGPU#WGSL#Compute Shaders#Three.js

WebGL 2.0 served the web faithfully for a decade, but its architectural constraints—notably the single-threaded draw call overhead and lack of general-purpose compute pipelines—severely limited simulation complexity.

Enter WebGPU Compute Passes

With WebGPU, we gain access to compute pipelines (GPUComputePipeline) written in WebGPU Shading Language (WGSL). Rather than encoding particle positions into hacky ping-pong floating-point textures, we operate directly on linear storage buffers:

// WGSL Particle Update Kernel
@compute @workgroup_size(64)
fn main(@builtin(global_invocation_id) global_id : vec3<u32>) {
  let index = global_id.x;
  if (index >= arrayLength(&particles)) { return; }

  var p = particles[index];
  p.velocity += computeHarmonicForce(p.position);
  p.position += p.velocity * params.deltaTime;
  particles[index] = p;
}

Zero Main-Thread CPU Overhead

Because calculations occur entirely within GPU workgroups, the browser’s JavaScript execution thread remains 100% idle for UI rendering, guaranteeing sub-15ms frame response even during intensive particle bursts.

Kaelen Voss
AUTHOR & RESEARCH LEAD

Kaelen Voss

Kaelen designs low-level GPU compute pipelines and WGSL shaders, translating cinematic simulation physics into real-time browser experiences.

Role: GPU Shader Architect•Meet Spectra Team →
FURTHER INVESTIGATION

Related Research Papers

Contact Us // Q2/Q3 Booking

Architect what comes next.

Have a spatial computing vision or ambitious 3D web product? Partner directly with our founding creative technologists.

Email: contact@example.com•Typical Response: < 4 Hours•Worldwide Availability
Branding✦Spatial UI Architecture✦WebGPU 3D Runtimes✦Digital Motion Systems✦Creative Direction✦Branding✦Spatial UI Architecture✦WebGPU 3D Runtimes✦Digital Motion Systems✦Creative Direction✦