#pragma once #include "core/commandbuffer.hpp" #include "core/descriptorset.hpp" #include "core/image.hpp" #include "core/pipeline.hpp" #include "core/sampler.hpp" #include "core/shadermodule.hpp" #include "common/utils.hpp" #include #include namespace LSFG_3_1::Shaders { using namespace LSFG; /// /// Alpha shader. /// class Alpha { public: Alpha() = default; /// /// Initialize the shaderchain. /// /// @param inImg One mipmap level /// /// @throws LSFG::vulkan_error if resource creation fails. /// Alpha(Vulkan& vk, Core::Image inImg); /// /// Dispatch the shaderchain. /// void Dispatch(const Core::CommandBuffer& buf, uint64_t frameCount); /// Get the output images [[nodiscard]] const auto& getOutImages() const { return this->outImgs; } /// Trivially copyable, moveable and destructible Alpha(const Alpha&) noexcept = default; Alpha& operator=(const Alpha&) noexcept = default; Alpha(Alpha&&) noexcept = default; Alpha& operator=(Alpha&&) noexcept = default; ~Alpha() = default; private: std::array shaderModules; std::array pipelines; Core::Sampler sampler; std::array descriptorSets; std::array lastDescriptorSet; Core::Image inImg; std::array tempImgs1; std::array tempImgs2; std::array tempImgs3; std::array, 3> outImgs; }; }