I made a fast particle collision system with O(N) complexity. Demo in the Video runs with 4.194.304 Particles on a RTX 4090
How does it work? By using a texture with position information for all particles, I blend the position values when multiple particles overlap. Additionally, I increment the alpha channel. Later, I calculate the midpoint for all overlapping particles, allowing me to determine a vector to move the particles away from each other. ... https://www.youtube.com/watch?v=_6JC6LWWL-A
Programmed in C# and XNA
Download: http://www.file-upload.net/download-4012693/gsim.zip.html
You also have to install the XNA-Framework to run this.
http://www.microsoft.com/download/en/details.aspx?id=27598
Controles: W A S D and Space to stop your motion.
Source Code without shader:
http://www.file-upload.net/download-4012862/gsim_source.zip.html
...
https://www.youtube.com/watch?v=976leRUq8g8