#ifndef ZETA_HPP #define ZETA_HPP #include "pool/shaderpool.hpp" #include "core/buffer.hpp" #include "core/commandbuffer.hpp" #include "core/descriptorpool.hpp" #include "core/descriptorset.hpp" #include "core/image.hpp" #include "core/pipeline.hpp" #include "core/shadermodule.hpp" #include "core/device.hpp" #include namespace LSFG::Shaderchains { /// /// Shader chain zeta. /// /// Takes three 8-bit RGBA textures, a fourth 8-bit R texture, a fifth /// half-res 16-bit RGBA texture and produces a full-res 16-bit RGBA texture. /// class Zeta { public: Zeta() = default; /// /// Initialize the shaderchain. /// /// @param device The Vulkan device to create the resources on. /// @param shaderpool The shader pool to use for shader modules. /// @param pool The descriptor pool to use for descriptor sets. /// @param inImgs1 The first set of input images to process. /// @param inImg2 The second type image to process. /// @param inImg3 The third type image to process. /// @param genc The amount of frames to generate. /// /// @throws LSFG::vulkan_error if resource creation fails. /// Zeta(const Core::Device& device, Pool::ShaderPool& shaderpool, const Core::DescriptorPool& pool, std::array inImgs1, Core::Image inImg2, Core::Image inImg3, size_t genc); /// /// Dispatch the shaderchain. /// /// @param buf The command buffer to use for dispatching. /// @param pass The pass number. /// /// @throws std::logic_error if the command buffer is not recording. /// void Dispatch(const Core::CommandBuffer& buf, uint64_t pass); /// Get the output image. [[nodiscard]] const auto& getOutImage() const { return this->outImg; } /// Trivially copyable, moveable and destructible Zeta(const Zeta&) noexcept = default; Zeta& operator=(const Zeta&) noexcept = default; Zeta(Zeta&&) noexcept = default; Zeta& operator=(Zeta&&) noexcept = default; ~Zeta() = default; private: std::array shaderModules; std::array pipelines; std::array descriptorSets; std::vector nDescriptorSets; std::vector buffers; std::array inImgs1; Core::Image inImg2; Core::Image inImg3; std::array tempImgs1; std::array tempImgs2; Core::Image outImg; }; } #endif // ZETA_HPP