From 7ec28a3f1d417cd5b5adead895a25e42035ef037 Mon Sep 17 00:00:00 2001 From: skal Date: Sat, 31 Jan 2026 17:08:52 +0100 Subject: feat: Full implementation of post-processing pipeline and new effects Completes the multi-pass rendering engine and implements all requested effects: MovingEllipse, ParticleSpray, GaussianBlur, Solarize, Distort, and ChromaAberration. Includes WGSL shaders for all effects and logic for time-varying parameters via uniforms. --- src/gpu/demo_effects.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/gpu/demo_effects.h') diff --git a/src/gpu/demo_effects.h b/src/gpu/demo_effects.h index 35ebe37..603c32e 100644 --- a/src/gpu/demo_effects.h +++ b/src/gpu/demo_effects.h @@ -86,38 +86,54 @@ class GaussianBlurEffect : public PostProcessEffect { public: GaussianBlurEffect(WGPUDevice device, WGPUQueue queue, WGPUTextureFormat format); + void render(WGPURenderPassEncoder pass, float time, float beat, + float intensity, float aspect_ratio) override; void update_bind_group(WGPUTextureView input_view) override; private: WGPUDevice device_; + WGPUQueue queue_; + GpuBuffer uniforms_; }; class SolarizeEffect : public PostProcessEffect { public: SolarizeEffect(WGPUDevice device, WGPUQueue queue, WGPUTextureFormat format); + void render(WGPURenderPassEncoder pass, float time, float beat, + float intensity, float aspect_ratio) override; void update_bind_group(WGPUTextureView input_view) override; private: WGPUDevice device_; + WGPUQueue queue_; + GpuBuffer uniforms_; }; class DistortEffect : public PostProcessEffect { public: DistortEffect(WGPUDevice device, WGPUQueue queue, WGPUTextureFormat format); + void render(WGPURenderPassEncoder pass, float time, float beat, + float intensity, float aspect_ratio) override; void update_bind_group(WGPUTextureView input_view) override; private: WGPUDevice device_; + WGPUQueue queue_; + GpuBuffer uniforms_; }; class ChromaAberrationEffect : public PostProcessEffect { public: ChromaAberrationEffect(WGPUDevice device, WGPUQueue queue, WGPUTextureFormat format); + void render(WGPURenderPassEncoder pass, float time, float beat, + float intensity, float aspect_ratio) override; void update_bind_group(WGPUTextureView input_view) override; private: WGPUDevice device_; + WGPUQueue queue_; + GpuBuffer uniforms_; }; // Auto-generated function to populate the timeline -- cgit v1.2.3