DepthUpsamplePass.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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/ComputePass.h>
  10. namespace AZ
  11. {
  12. namespace Render
  13. {
  14. // Compute shader that upsamples an input image from half res to full res using depth buffers
  15. class DepthUpsamplePass final
  16. : public RPI::ComputePass
  17. {
  18. AZ_RPI_PASS(DepthUpsamplePass);
  19. public:
  20. AZ_RTTI(AZ::Render::DepthUpsamplePass, "{CE22C02E-7F6C-4C70-845C-839A8B51479E}", AZ::RPI::ComputePass);
  21. AZ_CLASS_ALLOCATOR(DepthUpsamplePass, SystemAllocator);
  22. virtual ~DepthUpsamplePass() = default;
  23. //! Create function registered with the pass system (see PassSystem::AddPassCreator)
  24. static RPI::Ptr<DepthUpsamplePass> Create(const RPI::PassDescriptor& descriptor);
  25. protected:
  26. // Behavior functions override...
  27. void FrameBeginInternal(FramePrepareParams params) override;
  28. private:
  29. DepthUpsamplePass(const RPI::PassDescriptor& descriptor);
  30. // SRG binding indices...
  31. AZ::RHI::ShaderInputNameIndex m_constantsIndex = "m_constants";
  32. };
  33. } // namespace Render
  34. } // namespace AZ