Author Topic: Rendering Particles with Compute Shaders  (Read 1663 times)

0 Members and 1 Guest are viewing this topic.

JeGX

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2490
    • Geeks3D.com
Rendering Particles with Compute Shaders
« on: February 26, 2020, 05:49:26 PM »
Quote
I developed a technique to render single-pixel particles (using additive blending) with compute shaders rather than the usual fixed-function rasterization with vertex and fragment shaders. My approach runs 25‑335% faster than rasterization on the cases I tested and is particularly faster for some “pathological” cases (which for my application are not actually that uncommon). I observed these speedups on both NVIDIA and AMD GPUs.

Using this technique allowed me to ship an app that runs on minimum-spec hardware without sacrificing visual fidelity.

(UPDATE: After posting this article, I discovered that I could use the NV_shader_atomic_int64 OpenGL extension (which is also supported by newer AMD GPUs). With this extension my results are now 32‑400% faster than rasterization on the cases tested. I recommend using it where possible. See the Addendum for more information.)

Links:
- https://miketuritzin.com/post/rendering-particles-with-compute-shaders/
- https://www.slideshare.net/DevCentralAMD/holy-smoke-faster-particle-rendering-using-direct-compute-by-gareth-thomas