Kayle Gishen

Introduction

Using the parallel nature of n-body simulations we can take advantage of the GPU's large amount of cores. Using imageStore and imageLoad we can remove the necessity of using a frame buffer to store values.

Gravity Computation

The system is modeled using particles with equal mass and each particle has a force applied from all other particles. The Particles are setup as a VBO of size n. We then use the x-component of the vertex as the index into a 1D texture where all the positions are stored. Once the new positions have been calculated using Verlet integration, they are written to the old position texture.

Streak

The streak filter is a simple filter which samples from a texture at slightly offset values. This results in a particles which are stretched linearly.

Sobel

The post processing used is a simple sobel edge detector. The algorithm is run on the results of the original shader by rendering to a texture in the first stage and then using this texture for the sobel filter, so the process is done in 2D.