diff options
Diffstat (limited to 'src/gpu/effect.h')
| -rw-r--r-- | src/gpu/effect.h | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/gpu/effect.h b/src/gpu/effect.h index 5f49041..ba569c2 100644 --- a/src/gpu/effect.h +++ b/src/gpu/effect.h @@ -22,10 +22,13 @@ public: virtual ~Effect() = default; // One-time setup (load assets, create buffers). - virtual void init(MainSequence *demo) { (void)demo; } + virtual void init(MainSequence *demo) { + (void)demo; + } // Called when the effect starts playing in a sequence segment. - virtual void start() {} + virtual void start() { + } // Dispatch compute shaders. virtual void compute(WGPUCommandEncoder encoder, float time, float beat, @@ -42,19 +45,25 @@ public: float intensity, float aspect_ratio) = 0; // Called when the effect finishes in a sequence segment. - virtual void end() {} + virtual void end() { + } bool is_initialized = false; - virtual bool is_post_process() const { return false; } + virtual bool is_post_process() const { + return false; + } }; // Base class for all post-processing effects class PostProcessEffect : public Effect { public: - bool is_post_process() const override { return true; } + bool is_post_process() const override { + return true; + } // Post-process effects don't have a compute phase by default - void compute(WGPUCommandEncoder, float, float, float, float) override {} + void compute(WGPUCommandEncoder, float, float, float, float) override { + } // Fullscreen quad render void render(WGPURenderPassEncoder pass, float time, float beat, |
