ReflectionScreenSpacePass.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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/RPI.Public/Pass/ParentPass.h>
  10. namespace AZ
  11. {
  12. namespace Render
  13. {
  14. //! Parent pass for screenspace reflections, implements a frame delay to allow time
  15. //! for the previous frame texture to be populated
  16. class ReflectionScreenSpacePass
  17. : public RPI::ParentPass
  18. {
  19. AZ_RPI_PASS(ReflectionScreenSpacePass);
  20. public:
  21. AZ_RTTI(Render::ReflectionScreenSpacePass, "{0B27D7F1-F914-4D09-A46D-3E63404771E3}", ParentPass);
  22. AZ_CLASS_ALLOCATOR(Render::ReflectionScreenSpacePass, SystemAllocator, 0);
  23. //! Creates a new pass without a PassTemplate
  24. static RPI::Ptr<ReflectionScreenSpacePass> Create(const RPI::PassDescriptor& descriptor);
  25. void ResetFrameDelay() { m_frameDelayCount = 0; }
  26. private:
  27. explicit ReflectionScreenSpacePass(const RPI::PassDescriptor& descriptor);
  28. // Pass Overrides...
  29. bool IsEnabled() const override;
  30. mutable uint32_t m_frameDelayCount = 0;
  31. };
  32. } // namespace RPI
  33. } // namespace AZ