diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-16 08:44:31 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-16 08:44:31 +0100 |
| commit | 77c3389fdadc1f3d595dcc9f1a8d34be4255806f (patch) | |
| tree | 75234c51d332eb86365c47970ed3e1fd70bef279 /src/effects/gaussian_blur_effect_v2.h | |
| parent | 673b09df703daf437add932494a583ed50394f14 (diff) | |
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
Diffstat (limited to 'src/effects/gaussian_blur_effect_v2.h')
| -rw-r--r-- | src/effects/gaussian_blur_effect_v2.h | 33 |
1 files changed, 33 insertions, 0 deletions
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<std::string>& inputs, + const std::vector<std::string>& outputs); + + void render(WGPUCommandEncoder encoder, const UniformsSequenceParams& params, + NodeRegistry& nodes) override; + + private: + WGPURenderPipeline pipeline_; + WGPUBindGroup bind_group_; + WGPUSampler sampler_; + GaussianBlurParams blur_params_; + UniformBuffer<GaussianBlurParams> params_buffer_; + UniformBuffer<UniformsSequenceParams> uniforms_buffer_; +}; |
