/JobSystem_IndirectInstancing_Testbed

Testbed project exploring the performance of Unity's Job System/Burst compiler combined with GPU mesh instancing.

Primary LanguageC#MIT LicenseMIT

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).

Tested on Unity 2018.3.9.

Index

Modes

Currently 2 modes are explored:

  • Particle Swarm
    524.288 Particles
    See it in action 524.288 Particles
  • Animated Vector Field
    262.144 Vectors 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

  • [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)