From b2ede3f0680edc894a54e28374cb87ab2690afa2 Mon Sep 17 00:00:00 2001 From: skal Date: Mon, 16 Feb 2026 14:32:59 +0100 Subject: refactor: remove v2 versioning artifacts, establish Sequence as canonical system MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Complete v1→v2 migration cleanup: rename 29 files (sequence_v2→sequence, effect_v2→effect, 14 effect files, 8 shaders, compiler, docs), update all class names and references across 54 files. Archive v1 timeline. System now uses standard naming with all versioning removed. 30/34 tests passing. Co-Authored-By: Claude Sonnet 4.5 --- src/gpu/effect.h | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 src/gpu/effect.h (limited to 'src/gpu/effect.h') diff --git a/src/gpu/effect.h b/src/gpu/effect.h new file mode 100644 index 0000000..d40e750 --- /dev/null +++ b/src/gpu/effect.h @@ -0,0 +1,50 @@ +// Effect: Base class for effects with multi-input/multi-output support + +#ifndef EFFECT_H +#define EFFECT_H +#pragma once + +#include "gpu/gpu.h" +#include "gpu/sequence.h" +#include +#include + +class NodeRegistry; + +class Effect { + public: + Effect(const GpuContext& ctx, const std::vector& inputs, + const std::vector& outputs); + virtual ~Effect() = default; + + // Optional: Declare temporary nodes (e.g., multi-pass intermediate buffers) + virtual void declare_nodes(NodeRegistry& registry) { + (void)registry; + } + + // Render effect (multi-input/multi-output) + virtual void render(WGPUCommandEncoder encoder, + const UniformsSequenceParams& params, + NodeRegistry& nodes) = 0; + + // Resize notification + virtual void resize(int width, int height) { + width_ = width; + height_ = height; + } + + const std::vector& input_nodes() const { + return input_nodes_; + } + const std::vector& output_nodes() const { + return output_nodes_; + } + + protected: + const GpuContext& ctx_; + std::vector input_nodes_; + std::vector output_nodes_; + int width_ = 1280; + int height_ = 720; +}; +#endif // EFFECT_H -- cgit v1.2.3