When I’m try to use PxVolumeCache it results in huge performance drop no matter how much objects are there in scene.
I’ve set up test scene with 7000 static and 1000 dynamic objects. Than I’m caching sphere with radius of 5 meters. It has 14 static and 2 objects inside. Caching takes 0.05 ms - it’s ok. Than doing 800 raycasts with PxVolumeCache takes 15 ms. But doing the same raycasts with scene takes just 3 ms! So it results in 5x performance drop.
The problem is in NpVolumeCache::multiQuery. When I replace code inside NpVolumeCache::multiQuery with scene raycast - I’m getting expected 3 ms.
After some testing I discovered that performance drop is present in case PxVolumeCache has more than 3 objects(no matter how much object are there in scene).
P.S. My CPU is Intel i5-4590 3.30 GHz.