GPU Particle Systems Emitting Increase Over Time?

wait but this one works as you want right?
Shader Effect Problem | Babylon.js Playground

Only one particle active at the time

Kinda, but that was just to demonstrate the compounding rate with GPU ones and how normal ones did not.

Here is more of a “real” example.

If we crank the emit rate up to lets say 10 or something its not really noticeable, but at two you can see how the GPU one just runs away.

So in cases where like Im doing a rain or snow effect where the system counts might be more like 2k-4k and emitting at 200-300, the GPU one ends up going all in eventually while the CPU one stays at the rate that one would expect.

yes here you have to limit your rate to add new knowing you recycle
and also limit the max buffer size:
Shader Effect Problem | Babylon.js Playground

1 Like

The other aspect is that manualEmitCount is not implemented. User can set _accumulatedCount ro the desired number of particles and they will be created. That was a workaround I discovered. See GPU Particle Systems Emitting Increase Over Time? - #11 by HiGreg

let me check what it would take to support manualEmitCout

And here we are: Add support for manualEmitCount for GPUParticles by deltakosh · Pull Request #16108 · BabylonJS/Babylon.js

This PG will work as expected after the PR is merged:
Shader Effect Problem | Babylon.js Playground

4 Likes