Demo
Main Principles and processes
Orthographic camera
Make a orthographic camera that can be zoomed by mouse;
Click mouse to create particles
Get the position of mouse. Transform the rectangle and pass the matrix position to vertex shader.
Object-oriented programming
Create a particle class that includes particle.emit(), particle.render(), particle.update() and some particle properties.
Create a particle pool that contains 1000 particles. Every time when the user create particle, the particle set active from the pool. When the particle’s lifetime is less 0, the particle is set to inactive.