// SPDX-FileCopyrightText: 2019-2023 Connor McLaughlin // SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0) #pragma once #include "common/rectangle.h" #include "common/timer.h" #include "common/types.h" #include "gpu_device.h" #include #include #include #include class GPUPipeline; class GPUTexture; class PostProcessingChain; class PostProcessingShader { friend PostProcessingChain; public: struct Option { enum : u32 { MAX_VECTOR_COMPONENTS = 4 }; enum class Type { Invalid, Bool, Int, Float }; union Value { s32 int_value; float float_value; }; static_assert(sizeof(Value) == sizeof(u32)); using ValueVector = std::array; static_assert(sizeof(ValueVector) == sizeof(u32) * MAX_VECTOR_COMPONENTS); std::string name; std::string ui_name; std::string dependent_option; Type type; u32 vector_size; u32 buffer_size; u32 buffer_offset; ValueVector default_value; ValueVector min_value; ValueVector max_value; ValueVector step_value; ValueVector value; }; PostProcessingShader(); PostProcessingShader(std::string name); virtual ~PostProcessingShader(); ALWAYS_INLINE const std::string& GetName() const { return m_name; } ALWAYS_INLINE const std::vector