I'm trying to implement sorting using DirectCompute for my particle system. I found [this post][1], which is great, but the sorting is incredibly slow. The [C++ version][2] can sort a million integers in a few milliseconds. The Unity/C# version is running at about 2000 integers per second. I'm getting better performance than that with CPU sorting right now.
Is this a limitation of Unity? Has anyone come across a fast sorting algorithm that can handle more than a few thousand elements?
[1]: http://answers.unity3d.com/questions/498495/porting-dxsdk-gpu-bitonic-sort-to-unity.html
[2]: https://code.msdn.microsoft.com/windowsdesktop/DirectCompute-Basic-Win32-7d5a7408
↧