Particle system

I’d like to share something that I worked on and get some feedback if possible.

http://dusanbosnjak.com/test/webGL/new/fail/fire/particleLinkedList.html

It’s been a while since I’ve done any particle work, so I tried to make this mostly from scratch, using three.js and consulting this paper:

https://www.lri.fr/~mbl/ENS/IG2/devoir2/files/docs/particles.pdf

There were similar examples done with three.js, but they all relied on gl_pointSprite to generate the sprites. I didn’t like the fact that sin and cos are used in the pixel shader as well as any texture animation logic. My main goal was to make this with mesh sprites, and offload some animation to the vertex shader.

So the things that I played with was making a linked list in javascript, writing a shader to grow, fade, rotate and ‘construct’ the quad in screenspace and animate the texture sprite, as well as general logic on how to move things around. I also had some issues when emitting particles and animating the uvs on frame change, so i tried to fix it with some interpolation. If the 3d fps is really different than the animated texture fps, the texture should still look somewhat fluid.

Only a couple of buffers are being updated, most of the animation happens with uniforms. Each particle has a couple of random values assigned to it, and these are then used to vary the effects. But the effects themselves are controlled by a single uniform, the buffer just gets assigned a start time for each particle.

Now i’m wondering, since this is running kinda nice, it could use some more work, but i’m not sure what and if it should be done. Is this reinventing the wheel and would it be more viable to now jump into unity for example, and start making effects for a portfolio, or could this be a good base for making such stuff. I figure i have pretty low level access to this but there is probably a ton of work to be done.