PassGraphCompiler.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  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 <AtomToolsFramework/Graph/GraphCompiler.h>
  10. namespace PassCanvas
  11. {
  12. //! PassGraphCompiler traverses a pass graph, searching for and splicing shader code snippets, variable values and definitions,
  13. //! and other information into complete, functional pass types, passes, and shaders. Currently, the resulting files will be
  14. //! generated an output into the same folder location has the source graph.
  15. class PassGraphCompiler : public AtomToolsFramework::GraphCompiler
  16. {
  17. public:
  18. AZ_RTTI(PassGraphCompiler, "{4D9407B1-195A-404A-B97A-E2BA22207C87}", AtomToolsFramework::GraphCompiler);
  19. AZ_CLASS_ALLOCATOR(PassGraphCompiler, AZ::SystemAllocator);
  20. AZ_DISABLE_COPY_MOVE(PassGraphCompiler);
  21. static void Reflect(AZ::ReflectContext* context);
  22. PassGraphCompiler() = default;
  23. PassGraphCompiler(const AZ::Crc32& toolId);
  24. virtual ~PassGraphCompiler();
  25. // AtomToolsFramework::GraphCompiler overrides...
  26. AZStd::string GetGraphPath() const;
  27. bool CompileGraph(GraphModel::GraphPtr graph, const AZStd::string& graphName, const AZStd::string& graphPath) override;
  28. };
  29. } // namespace PassCanvas