Compute Shader Boids

I’ve known about compute shaders and their capabilities for a while, but never gotten around to learning how to utilize them. I recently decided it was about time I learn this tool. This boids system was one of the first visual representation using them.


Simple Boids

I was looking for a good primarily math-based system to test the performance differences between classic CPU logic and GPU compute shaders, and simple boids came to mind. I went with a simple boids algorithm because it’s a very straightforward algorithm to build in both operating environments.

The following examples compare using the CPU and GPU to calculate only the movement of the boids. No further optimizations that could affect both options were taken. Both systems were run at 1080p and pushed until they started averaging ~30fps

Next
Next

Unnamed Space Game