MorphTargetComputePass.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. #include <Atom/RHI.Reflect/Base.h>
  11. namespace AZ
  12. {
  13. namespace Render
  14. {
  15. class SkinnedMeshFeatureProcessor;
  16. //! The morph target compute pass submits dispatch items for morph targets. The dispatch items are cleared every frame, so it needs to be re-populated.
  17. class MorphTargetComputePass
  18. : public RPI::ComputePass
  19. {
  20. AZ_RPI_PASS(MorphTargetComputePass);
  21. public:
  22. AZ_RTTI(AZ::Render::MorphTargetComputePass, "{14EEACDF-C1BB-4BFC-BB27-6821FDE276B0}", RPI::ComputePass);
  23. AZ_CLASS_ALLOCATOR(MorphTargetComputePass, SystemAllocator);
  24. MorphTargetComputePass(const RPI::PassDescriptor& descriptor);
  25. static RPI::Ptr<MorphTargetComputePass> Create(const RPI::PassDescriptor& descriptor);
  26. Data::Instance<RPI::Shader> GetShader() const;
  27. private:
  28. void BuildInternal() override;
  29. void SetupFrameGraphDependencies(RHI::FrameGraphInterface frameGraph) override;
  30. void BuildCommandListInternal(const RHI::FrameGraphExecuteContext& context) override;
  31. SkinnedMeshFeatureProcessor* GetSkinnedMeshFeatureProcessor();
  32. };
  33. }
  34. }