Nice! What doesnât feel right?
Perf. Seems off. This is 256x256 (maximum compute cores I can run I think) and so its only 65K particles. And quite a small texture (in real terms). I think it should be possible to do much more than this. Going to look at multi-dispatches and see if that helps. Not now, but prob in a few weeks time.
Maybe I can take a look at the performance and see if I can find anything. Iâll let you know
The low performance isnât because of the compute shader, itâs because of this loop happening in your âparticleâ shader:
That shader takes up something like 99.9% of the performance when I profile it in xcode
Yeah. I realized that would be an issue. Count = frag x image pixels.
However I have done many more than this in the past âŠ
It is more of an arch issue I think. The compute prob should write particle âpatchesâ out to a number of textures with multiple dispatches (thats what I was referring to above). Then the patches are written directly rather than via the fullscreen shader.
Current version also could do with getting more ops in the compute shader too - ie each compute maybe handles the updates of a number of particles, and not just one
Anyway⊠will look at later. Thanks for the response.