JobSystem_IndirectInstancing_Testbed
JobSystem_IndirectInstancing_Testbed copied to clipboard
Testbed project exploring the performance of Unity's Job System/Burst compiler combined with GPU mesh instancing.
Unity Job System & Indirect Instancing Testbed
Testbed project exploring the performance of Unity's Job System / Burst compiler combined with GPU mesh instancing (using the DrawMeshInstancedIndirect function, and passing Job System's NativeArrays directly to the shaders as ComputeBuffers).
The functionality provided by this project is slowly becoming obsolete, as the Visual Effect Graph can handle at least an order of magnitude more particles at comparable frame rates.
It's still a good example for basic DOTS data generation & useful for situations where the use of GPU / VFX Graph is not preferred.
Tested on Unity 2022.1.2f1
Index
Modes
Currently 2 modes are explored:
-
Particle Swarm
524.288 Particles
See it in action -
Animated Vector Field
262.144 Vectors
Performance:
CPU: Intel i7 5930k, GPU: Nvidia GTX 970
Swarm:
524.288 Particles particles at 60-70 fps
1.048.576 Particles particles at 30 fps
Packages Used
To Do
- Add support for HDRP and URP
- [Particle Swarm] Implement spatial binning using the Concurrent NativeMultiHashMap collection.
- [Particle Swarm] Implement flocking / Boid behaviour.
- [Particle Swarm] Implement Unity's ECS (Entity Component System)