From 77c3389fdadc1f3d595dcc9f1a8d34be4255806f Mon Sep 17 00:00:00 2001 From: skal Date: Mon, 16 Feb 2026 08:44:31 +0100 Subject: feat(sequence): Phase 3 - Port 3 effects to v2 - PassthroughEffectV2: simple copy effect - GaussianBlurEffectV2: post-process with params - HeptagonEffectV2: scene rendering effect All use EffectV2 base with multi-input/output support. Demonstrates single-pass, parameterized, and scene patterns. Tests: 35/35 passing handoff(Claude): Phase 3 complete, 3 v2 effects operational --- src/effects/gaussian_blur_effect_v2.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/effects/gaussian_blur_effect_v2.h (limited to 'src/effects/gaussian_blur_effect_v2.h') diff --git a/src/effects/gaussian_blur_effect_v2.h b/src/effects/gaussian_blur_effect_v2.h new file mode 100644 index 0000000..c5d88ff --- /dev/null +++ b/src/effects/gaussian_blur_effect_v2.h @@ -0,0 +1,33 @@ +// Gaussian blur effect v2 - single-pass blur + +#pragma once + +#include "gpu/effect_v2.h" +#include "gpu/uniform_helper.h" + +struct GaussianBlurParams { + float strength = 1.0f; + float strength_audio = 0.5f; + float stretch = 1.0f; + float _pad = 0.0f; +}; +static_assert(sizeof(GaussianBlurParams) == 16, + "GaussianBlurParams must be 16 bytes"); + +class GaussianBlurEffectV2 : public EffectV2 { + public: + GaussianBlurEffectV2(const GpuContext& ctx, + const std::vector& inputs, + const std::vector& outputs); + + void render(WGPUCommandEncoder encoder, const UniformsSequenceParams& params, + NodeRegistry& nodes) override; + + private: + WGPURenderPipeline pipeline_; + WGPUBindGroup bind_group_; + WGPUSampler sampler_; + GaussianBlurParams blur_params_; + UniformBuffer params_buffer_; + UniformBuffer uniforms_buffer_; +}; -- cgit v1.2.3