SsaoSettings.cpp 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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 <AzCore/Math/MathUtils.h>
  9. #include <AzCore/Serialization/SerializeContext.h>
  10. #include <Atom/RPI.Public/Image/ImageSystemInterface.h>
  11. #include <Atom/RPI.Public/Pass/PassSystemInterface.h>
  12. #include <Atom/RPI.Public/RPIUtils.h>
  13. #include <Atom/RPI.Public/Shader/ShaderResourceGroup.h>
  14. #include <Atom/RPI.Public/Scene.h>
  15. #include <Atom/RPI.Public/View.h>
  16. #include <PostProcess/Ssao/SsaoSettings.h>
  17. #include <PostProcess/PostProcessFeatureProcessor.h>
  18. namespace AZ
  19. {
  20. namespace Render
  21. {
  22. SsaoSettings::SsaoSettings(PostProcessFeatureProcessor* featureProcessor)
  23. : PostProcessBase(featureProcessor)
  24. {
  25. }
  26. void SsaoSettings::OnConfigChanged()
  27. {
  28. m_parentSettings->OnConfigChanged();
  29. }
  30. void SsaoSettings::ApplySettingsTo(SsaoSettings* target, float alpha) const
  31. {
  32. AZ_Assert(target != nullptr, "SsaoSettings::ApplySettingsTo called with nullptr as argument.");
  33. // Auto-gen code to blend individual params based on their override value onto target settings
  34. #define OVERRIDE_TARGET target
  35. #define OVERRIDE_ALPHA alpha
  36. #include <Atom/Feature/ParamMacros/StartOverrideBlend.inl>
  37. #include <Atom/Feature/PostProcess/Ssao/SsaoParams.inl>
  38. #include <Atom/Feature/ParamMacros/EndParams.inl>
  39. #undef OVERRIDE_TARGET
  40. #undef OVERRIDE_ALPHA
  41. }
  42. void SsaoSettings::Simulate(float deltaTime)
  43. {
  44. m_deltaTime = deltaTime;
  45. }
  46. } // namespace Render
  47. } // namespace AZ