DisplayMapperFullScreenPass.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 <AzCore/Memory/SystemAllocator.h>
  10. #include <Atom/RPI.Public/Pass/FullscreenTrianglePass.h>
  11. namespace AZ
  12. {
  13. namespace Render
  14. {
  15. /**
  16. * Fullscreen pass as a base for children passes to the DisplayMapperPass.
  17. * Children fullscreen passes created by the DisplayMapper subclass this and it provides
  18. * a way to tidy up the code for connecting to the input attachment of this pass with an
  19. * attachment from another pass. This is provided as the reference pass and reference
  20. * attachment. These are determined when the children passes are created by the DisplayMapper.
  21. */
  22. class DisplayMapperFullScreenPass
  23. : public RPI::FullscreenTrianglePass
  24. {
  25. AZ_RPI_PASS(DisplayMapperFullScreenPass);
  26. public:
  27. AZ_RTTI(DisplayMapperFullScreenPass, "{11E9EBE0-DF6D-4260-9281-C99E386231BF}", RPI::FullscreenTrianglePass);
  28. AZ_CLASS_ALLOCATOR(DisplayMapperFullScreenPass, SystemAllocator);
  29. virtual ~DisplayMapperFullScreenPass();
  30. /// Creates a DisplayMapperFullScreenPass
  31. static RPI::Ptr<DisplayMapperFullScreenPass> Create(const RPI::PassDescriptor& descriptor);
  32. void SetInputReferencePassName(const Name& passName);
  33. void SetInputReferenceAttachmentName(const Name& attachmentName);
  34. protected:
  35. explicit DisplayMapperFullScreenPass(const RPI::PassDescriptor& descriptor);
  36. // Pass behavior overrides...
  37. virtual void BuildInternal() override;
  38. private:
  39. Name m_inputReferencePassName = Name{ "Parent" };
  40. Name m_inputReferenceAttachmentName = Name{ "Input" };
  41. const Name InputAttachmentName = Name{ "Input" };
  42. };
  43. } // namespace Render
  44. } // namespace AZ