Skip to content

Fluids S2 (spike): one GPU particle system on WebGPU and WebGL2 #420

Description

@pasquelin

Why

Spike S2 of the fluids parent. It decides whether one particle API can serve both renderers.

To do

  • Search first. Reuse any engine sprite or particle path. The open world's rain and particles (moving to pasquelin/Trillion3D-openworld) are prior art only, never imported.
  • One GPU particle system
    • Fixed capacity per pool; buffers allocated once; ring-buffer emission with no CPU compaction.
    • WebGL2: position and velocity in half-float ping-pong textures (GLSL). WebGPU: a compute shader (WGSL). The emission API is the same on both.
    • Rendering with no global sort: fire is additive; smoke is premultiplied alpha with a coarse sort per emitter.
    • Soft particles (fade with depth), and flipbooks interpolated between frames with motion vectors.
    • Previous state kept for temporal antialiasing (one extra position), and a reactive mask.
  • Measure capacity, cost per tier and TAA ghosting on both renderers.

Proof

A GO or NO-GO on a single API, with numbers per renderer and per tier, published as a comment on this issue.

Links

Fluids parent #417. Blocked by #395.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestmeasure okTiming passed (numbers in a comment)physicsPhysics: colliders, bodies, character, fluids🟠 highHigh priority: memory recovery, constrained machines

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions