position of a particle can be computed on the client side or on the GPU.
- Simulate the physical equations of the
particles on the CPU; apply the appropriate transformations to the modelview
matrix and render each particle.
- Direct solution: The client sends the initial position, start
time, and velocity of each particle. The
equation of motion is evaluated in the vertex shader and the particle is rendered. Example: next slide.
- Integration: The client sends the initial position, start
time, and velocity of each particle. In
the vertex shader, particles are moved one time step in a numerical integration.
OpenGL Cookbook Chapter 9 has examples of both approaches.Source:
Cookbook, Chapter 9