djeedai / bevy_hanabi

🎆 Hanabi — a GPU particle system plugin for the Bevy game engine.
Apache License 2.0
927 stars 73 forks source link

Fix effects getting stuck after a deletion #330

Closed djeedai closed 4 months ago

djeedai commented 4 months ago

Fix some effects not updating after one or more effects have been deleted. This was due to the indirect pass shader assuming a contiguous ParticleGroup array, but that array contains gaps where effects have been deallocated, so updating a number of rows equal to the number of active effect means updating some unused rows and skipping some used ones in case there's any gap.

djeedai commented 4 months ago

@NiseVoid if you want to try that change, it should fix effects getting stuck after another effect was deleted.