SubsurfaceScatteringPass.h 1.5 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 RPI
  13. {
  14. class ShaderResourceGroup;
  15. //! A SubsurfaceScatteringPass is a leaf pass (pass with no children) inherited from ComputePass used for subsurface scattering,
  16. //! due to the requirement of ViewSrg which not available in the original ComputePass template
  17. class SubsurfaceScatteringPass
  18. : public ComputePass
  19. {
  20. AZ_RPI_PASS(SubsurfaceScatteringPass);
  21. public:
  22. AZ_RTTI(SubsurfaceScatteringPass, "{15036827-D18C-4752-B58F-6F17D59D6D9E}", RenderPass);
  23. AZ_CLASS_ALLOCATOR(SubsurfaceScatteringPass, SystemAllocator);
  24. virtual ~SubsurfaceScatteringPass() = default;
  25. //! Creates a SubsurfaceScatteringPass
  26. static Ptr<SubsurfaceScatteringPass> Create(const PassDescriptor& descriptor);
  27. protected:
  28. SubsurfaceScatteringPass(const PassDescriptor& descriptor);
  29. void CompileResources(const RHI::FrameGraphCompileContext& context) override;
  30. // output texture vertical dimension required by compute shader
  31. AZ::RHI::ShaderInputNameIndex m_screenSizeInputIndex = "m_screenSize";
  32. };
  33. } // namespace RPI
  34. } // namespace AZ