blob: 9aa2c67d86b38cc66fe8e13212fe27ae15495a03 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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;
};
|