Add external particle life sample #548
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a sample showing a particle life simulation that runs on WebGPU. It uses spatial partitioning with atomic linked lists / counting sort to achieve larger numbers of particles.
The sample code itself has become quite large (it's around 2000 lines spread across multiple files and folders). So it's probably better as an external sample.
The reason i'm submitting this as a sample is because the simulation itself does use atomic linked lists and counting sort in an applied context to do spatial partitioning allowing for the simulation to avoid n^2 computations improving performance. This property of the sample could potentially make it a useful resource to others looking to develop their own simulations that involve spatial partitioning or particles.
I'm happy to make any changes that may be needed to contribute.
Please let me know whether this sample is appropriate for inclusion.
External sample: https://gpu-life.silverspace.io?sample
Repository: https://github.com/SilverSpace505/gpu-life