Skip to content
Particle accelleration with OpenGL 4.3, using the compute shader to calculate particle movement on graphics hardware.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Screenshots
lib Added GLFW and GLEW libraries for easier Win32 compilation Jan 14, 2016
src
.DS_Store
.gitignore
CMakeLists.txt removed unused shader Jan 14, 2016
LICENSE added license Jan 13, 2016
README.md corrected grammar mistakes and such Mar 6, 2016

README.md

Particle-Simulation using the GPU via the OpenGL Compute-Shader

This particle simulation is more like a proof of concept for myself or others, to show and understand how compute shaders in OpenGL work. Using the knowledge I gathered from this project, more complex, fascinating and fast projects are possible, which use the power of the graphics hardware for computations.

The final result looks like that:

Particle-Simulation

Animation

Each particle has a life span in which it fades from red (new born) to blue (about dying). When a particle dies, it respawnes in its negated (x,y,z) position.

The movement itself is computed using an Euler integration method for each particle.

There are several global randomly moving attraction points. Particles are attracted and accelerated by these points.

Example screenshots:

Particle-Simulation Particle-Simulation Particle-Simulation

Install && Run

I tested an ran this simulation on a debian-based Linux OS (Ubuntu, Mint, ...). It should run on other machines as well but is not tested.

System Requirements

The following system attributes are required for running this simulation:

  • A graphics card supporting OpenGL version 4.3 (For the compute-shader!).

  • Unix-Libraries: xorg-dev and mesa-common-dev

Both GLEW (The OpenGL Extension Wrangler Library) and GLFW (Window-Manager) are now included locally, so no system wide installation is necessary!

For a system wide installation, further information is available under the following links:

Running

Compiling and running should work under windows. OSX is not supported as the available OpenGL version does not reach 4.3. In the root directory, execute:

  • cmake .

  • make

  • cd bin/

  • ./particleSim

While the simulation runs, you can move around (always looking to the center!) with your mouse (left-klick and move) and zoom in/out with your mouse (right click and move up/down).

More Screenshots

So, here are some more screenshots, because screenshots are awesome :)

Particle-Simulation Particle-Simulation Particle-Simulation Particle-Simulation Particle-Simulation Particle-Simulation Particle-Simulation Particle-Simulation Particle-Simulation

You can find some more screenshots in the screenshot-folder: More Screenshots :).

You can’t perform that action at this time.