| 34 | bool SimulationManager::sEnableProbeCachingForMissingProbes = false; |
| 35 | |
| 36 | SimulationManager::SimulationManager(bool enableDirect, |
| 37 | bool enableIndirect, |
| 38 | bool enablePathing, |
| 39 | SceneType sceneType, |
| 40 | IndirectEffectType indirectType, |
| 41 | int maxNumOcclusionSamples, |
| 42 | int maxNumRays, |
| 43 | int numDiffuseSamples, |
| 44 | float maxDuration, |
| 45 | int maxOrder, |
| 46 | int maxNumSources, |
| 47 | int maxNumListeners, |
| 48 | int numThreads, |
| 49 | int rayBatchSize, |
| 50 | int numVisSamples, |
| 51 | bool asymmetricVisRange, |
| 52 | const Vector3f& down, |
| 53 | int samplingRate, |
| 54 | int frameSize, |
| 55 | shared_ptr<OpenCLDevice> openCL, |
| 56 | shared_ptr<RadeonRaysDevice> radeonRays, |
| 57 | shared_ptr<TANDevice> tan) |
| 58 | : mEnableDirect(enableDirect) |
| 59 | , mEnableIndirect(enableIndirect) |
| 60 | , mEnablePathing(enablePathing) |
| 61 | , mSceneType(sceneType) |
| 62 | , mIndirectType(indirectType) |
| 63 | , mMaxNumOcclusionSamples(maxNumOcclusionSamples) |
| 64 | , mMaxDuration(maxDuration) |
| 65 | , mMaxOrder(maxOrder) |
| 66 | , mNumVisSamples(numVisSamples) |
| 67 | , mAsymmetricVisRange(asymmetricVisRange) |
| 68 | , mDown(down) |
| 69 | , mSamplingRate(samplingRate) |
| 70 | , mFrameSize(frameSize) |
| 71 | , mOpenCL(openCL) |
| 72 | , mTAN(tan) |
| 73 | , mSceneVersion(0) |
| 74 | { |
| 75 | if (enableDirect) |
| 76 | { |
| 77 | mDirectSimulator = make_unique<DirectSimulator>(maxNumOcclusionSamples); |
| 78 | } |
| 79 | |
| 80 | if (enablePathing || enableIndirect) |
| 81 | { |
| 82 | mProbeManager = make_unique<ProbeManager>(); |
| 83 | } |
| 84 | |
| 85 | if (enableIndirect) |
| 86 | { |
| 87 | mReflectionSimulator = ReflectionSimulatorFactory::create(sceneType, maxNumRays, numDiffuseSamples, maxDuration, |
| 88 | maxOrder, maxNumSources, maxNumListeners, numThreads, rayBatchSize, |
| 89 | radeonRays); |
| 90 | |
| 91 | if (indirectType != IndirectEffectType::Parametric) |
| 92 | { |
| 93 | mReconstructor = ReconstructorFactory::create(sceneType, indirectType, maxDuration, maxOrder, |