diff options
Diffstat (limited to 'src/gpu/effects/flash_effect.h')
| -rw-r--r-- | src/gpu/effects/flash_effect.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gpu/effects/flash_effect.h b/src/gpu/effects/flash_effect.h new file mode 100644 index 0000000..9aa2c67 --- /dev/null +++ b/src/gpu/effects/flash_effect.h @@ -0,0 +1,18 @@ +// This file is part of the 64k demo project. +// It declares the FlashEffect - brief white flash on beat hits. + +#pragma once + +#include "gpu/effect.h" +#include "gpu/gpu.h" + +class FlashEffect : public PostProcessEffect { + public: + FlashEffect(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: + float flash_intensity_ = 0.0f; +}; |
