Skip to content

Particle system that's both calculated and rendered on the GPU using the Metal framework

Notifications You must be signed in to change notification settings

CalebKierum/ParticleLab

 
 

Repository files navigation

Particle Lab Refactored

Awhile back FlexMonkey developed a particle system that could simulate a few million particles for a multi-touhch display at 40fps. However this original version has not been updated to more modern versions of metal. Additionally the original version had synchronization issues that caused flickering and other artifacts.

I have refactored and revamped the original version adding in my own version of "Glow" mode, fixing synchronization issues, and ultimately making many sections run faster. I have also caused particles that are large distances out to respawn. Force touch also now changes the strength of the gravity wells.

To do this I had to make some changes to the comupte shader simulating the particles, large changes to the core engine and data structures, and of course added in some additional post processing logic.

Results

Glow Mode

Screenshot

Glow mode is achieved through my method allowing you to composite a complex blur over your scene.

Cloud Mode

Screenshot

This effect is achieved by consistently blurring the image then using a min filter to pull in darker colors creating the effect of wisps.

Video of it in action

About

Particle system that's both calculated and rendered on the GPU using the Metal framework

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 77.9%
  • Metal 21.0%
  • Objective-C 1.1%