WhiteBalanceSettings.cpp 1.9 KB

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