High performance texture atlas with animated sprite particles

I’m developing a new particle engine and have just finished integrating a texture atlas that supports an array of images, animated sprites, and texture parameters like offset, repeat, and center. This is my testing sandbox for the animated sprites, and it’s looking pretty cool, so I’m sharing it here.

The demo doesn’t include index sorting for proper alpha blending, but that’s already implemented in the final library (update: the sorting is included now). Heavily inspired by the three-nebula particle engine, this version is tailored specifically for THREE.Points and THREE.InstancedMeshes, relying exclusively on BufferAttributes, taking performances to another level. The main thread version is fully operational, featuring a main Emitter with various shapes, effects, and a new Span library for interpolating THREE’s math objects (Numbers, Vectors, Matrices, etc.). I’m currently working on the documentation and extending the engine to a web worker version with SharedArrayBuffer support.

10 Likes

This looks insane (in its positive sense). Is there any significant impact on performance when sorting is applied continuously?

1 Like

@PavelBoytchev The only way to find out is by testing it! I’ve updated the demo, added the indices and a sorting function, It’s similar to the one in this custom attributes points example, with a few optimizations.

Thanks, by the way! I should have added this from the start—now it looks gorgeous! :grinning:

1 Like

Yep, with proper blending the crowd looks much more dense. The only remaining question is … where is Waldo/Wally?

2 Likes

That’s a great idea for an easter egg :smile:, I’ll definitely add some in the upcoming examples.

1 Like