This is a flocking agents simulation written in Unity with compute shaders as a project for the Arsiliath workshop. While some members of the workshop explored using texture-based solutions, myself and a few others explored more traditional sorting-based spatial partitioning solutions.
I built this project using Uniform Spatial Partitioning (as expertly explained in Chisolm) and learned how to implement a parallel prefix-sum operation for use in USP. The result was a simulation that could handle up to 5 million flocking agents in real time!