diff options
Diffstat (limited to 'src/effects/theme_modulation_effect.h')
| -rw-r--r-- | src/effects/theme_modulation_effect.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/effects/theme_modulation_effect.h b/src/effects/theme_modulation_effect.h new file mode 100644 index 0000000..e4d4e0a --- /dev/null +++ b/src/effects/theme_modulation_effect.h @@ -0,0 +1,20 @@ +// This file is part of the 64k demo project. +// It implements a theme modulation effect that alternates between bright and +// dark. Pattern changes every 2 seconds, so we alternate every 4 seconds (2 +// patterns). + +#pragma once +#include "gpu/effect.h" +#include "gpu/post_process_helper.h" +#include "gpu/uniform_helper.h" + +class ThemeModulationEffect : public PostProcessEffect { + public: + ThemeModulationEffect(const GpuContext& ctx); + void render(WGPURenderPassEncoder pass, + const CommonPostProcessUniforms& uniforms) override; + void update_bind_group(WGPUTextureView input_view) override; + + private: + GpuBuffer params_buffer_; +}; |
