SpecularReflectionsFeatureProcessor.h 2.1 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. #pragma once
  9. #include <Atom/Feature/SpecularReflections/SpecularReflectionsFeatureProcessorInterface.h>
  10. #include <Atom/RHI.Reflect/ShaderInputNameIndex.h>
  11. namespace AZ
  12. {
  13. namespace Render
  14. {
  15. class SpecularReflectionsFeatureProcessor final
  16. : public SpecularReflectionsFeatureProcessorInterface
  17. {
  18. public:
  19. AZ_CLASS_ALLOCATOR(SpecularReflectionsFeatureProcessor, SystemAllocator)
  20. AZ_RTTI(AZ::Render::SpecularReflectionsFeatureProcessor, "{3C08E4DD-B4A4-4FD6-A56A-D1D97A8C31CD}", AZ::Render::SpecularReflectionsFeatureProcessorInterface);
  21. static void Reflect(AZ::ReflectContext* context);
  22. SpecularReflectionsFeatureProcessor() = default;
  23. virtual ~SpecularReflectionsFeatureProcessor() = default;
  24. void Activate() override;
  25. void Deactivate() override;
  26. // ReflectionProbeFeatureProcessorInterface overrides
  27. void SetSSROptions(const SSROptions& ssrOptions) override;
  28. const SSROptions& GetSSROptions() const override { return m_ssrOptions; }
  29. private:
  30. AZ_DISABLE_COPY_MOVE(SpecularReflectionsFeatureProcessor);
  31. // RPI::SceneNotificationBus::Handler overrides
  32. void OnRenderPipelineChanged(AZ::RPI::RenderPipeline* pipeline, AZ::RPI::SceneNotification::RenderPipelineChangeType changeType) override;
  33. void UpdatePasses();
  34. SSROptions m_ssrOptions;
  35. RHI::ShaderInputNameIndex m_invOutputScaleNameIndex = "m_invOutputScale";
  36. RHI::ShaderInputNameIndex m_maxRoughnessNameIndex = "m_maxRoughness";
  37. RHI::ShaderInputNameIndex m_reflectionMethodNameIndex = "m_reflectionMethod";
  38. RHI::ShaderInputNameIndex m_rayTraceFallbackSpecularNameIndex = "m_rayTraceFallbackSpecular";
  39. };
  40. } // namespace Render
  41. } // namespace AZ