Project 3: N-Body

CS 195V: Advanced GPU Programming

Justin Ardini (jardini)

Simulation

I did an N-Body simulation with a 128x128 texture storing particle positions and masses. The accelerations are calculated in a shader using Verlet integration. Using imageStore was really slow for me, so I instead output to a texture using out_Color.

My planets are point particles that are colored bluish-green using 3d simplex noise based off the current gl_PointCoord and the current point instance ID.

Post-processing

I implemented crepuscular rays for a cool-looking galaxy simulation.


I also implemented a swirl effect for what was intended to be a black hole but ended up up looking much different.