DisplayMapperFullScreenPass.cpp 1.7 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. #include <DisplayMapper/DisplayMapperFullScreenPass.h>
  9. #include <Atom/RHI/FrameGraphAttachmentInterface.h>
  10. #include <Atom/RHI/Factory.h>
  11. namespace AZ
  12. {
  13. namespace Render
  14. {
  15. RPI::Ptr<DisplayMapperFullScreenPass> DisplayMapperFullScreenPass::Create(const RPI::PassDescriptor& descriptor)
  16. {
  17. RPI::Ptr<DisplayMapperFullScreenPass> pass = aznew DisplayMapperFullScreenPass(descriptor);
  18. return pass;
  19. }
  20. DisplayMapperFullScreenPass::DisplayMapperFullScreenPass(const RPI::PassDescriptor& descriptor)
  21. : RPI::FullscreenTrianglePass(descriptor)
  22. {
  23. }
  24. DisplayMapperFullScreenPass::~DisplayMapperFullScreenPass()
  25. {
  26. }
  27. void DisplayMapperFullScreenPass::BuildInternal()
  28. {
  29. RPI::PassConnection inConnection;
  30. inConnection.m_localSlot = InputAttachmentName;
  31. inConnection.m_attachmentRef.m_pass = m_inputReferencePassName;
  32. inConnection.m_attachmentRef.m_attachment = m_inputReferenceAttachmentName;
  33. ProcessConnection(inConnection);
  34. }
  35. void DisplayMapperFullScreenPass::SetInputReferencePassName(const Name& passName)
  36. {
  37. m_inputReferencePassName = passName;
  38. }
  39. void DisplayMapperFullScreenPass::SetInputReferenceAttachmentName(const Name& attachmentName)
  40. {
  41. m_inputReferenceAttachmentName = attachmentName;
  42. }
  43. } // namespace Render
  44. } // namespace AZ