SampleComponentManager_Windows.cpp 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include <SampleComponentManager.h>
  9. namespace AtomSampleViewer
  10. {
  11. bool SampleComponentManager::IsMultiViewportSwapchainSampleSupported()
  12. {
  13. return true;
  14. }
  15. void SampleComponentManager::AdjustImGuiFontScale()
  16. {
  17. }
  18. const char* SampleComponentManager::GetRootPassTemplateName()
  19. {
  20. // Use Low end pipeline template for VR
  21. AZ::RPI::XRRenderingInterface* xrSystem = AZ::RPI::RPISystemInterface::Get()->GetXRSystem();
  22. if(xrSystem)
  23. {
  24. return "LowEndPipelineTemplate";
  25. }
  26. return "MainPipeline";
  27. }
  28. const char* SampleComponentManager::GetMaterialPipelineName()
  29. {
  30. // Use Low end pipeline template for VR
  31. AZ::RPI::XRRenderingInterface* xrSystem = AZ::RPI::RPISystemInterface::Get()->GetXRSystem();
  32. if (xrSystem)
  33. {
  34. return "LowEndPipeline";
  35. }
  36. return "MainPipeline";
  37. }
  38. int SampleComponentManager::GetDefaultNumMSAASamples()
  39. {
  40. // Use sample count of 1 for VR pipelines
  41. AZ::RPI::XRRenderingInterface* xrSystem = AZ::RPI::RPISystemInterface::Get()->GetXRSystem();
  42. if (xrSystem)
  43. {
  44. return 1;
  45. }
  46. return 4;
  47. }
  48. } // namespace AtomSampleViewer