Optimize physics simulation with higher limit of 8 threads

This commit is contained in:
Wojtek Figat
2025-06-19 09:50:07 +02:00
parent edb6884942
commit 6144f6c74e

View File

@@ -1794,7 +1794,7 @@ void* PhysicsBackend::CreateScene(const PhysicsSettings& settings)
{
if (CpuDispatcher == nullptr)
{
uint32 threads = Math::Clamp<uint32>(Platform::GetCPUInfo().ProcessorCoreCount - 1, 1, 4);
uint32 threads = Math::Clamp<uint32>(Platform::GetCPUInfo().ProcessorCoreCount - 1, 1, 8);
CpuDispatcher = PxDefaultCpuDispatcherCreate(threads);
CHECK_INIT(CpuDispatcher, "PxDefaultCpuDispatcherCreate failed!");
}