summaryrefslogtreecommitdiff
path: root/src/gpu/effects/theme_modulation_effect.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/effects/theme_modulation_effect.cc')
-rw-r--r--src/gpu/effects/theme_modulation_effect.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gpu/effects/theme_modulation_effect.cc b/src/gpu/effects/theme_modulation_effect.cc
index fc52b62..f9ae636 100644
--- a/src/gpu/effects/theme_modulation_effect.cc
+++ b/src/gpu/effects/theme_modulation_effect.cc
@@ -26,7 +26,9 @@ ThemeModulationEffect::ThemeModulationEffect(const GpuContext& ctx)
struct EffectParams {
theme_brightness: f32,
- _pad: vec3<f32>,
+ _pad0: f32,
+ _pad1: f32,
+ _pad2: f32,
};
@group(0) @binding(0) var inputSampler: sampler;
@@ -59,14 +61,14 @@ ThemeModulationEffect::ThemeModulationEffect(const GpuContext& ctx)
pipeline_ =
create_post_process_pipeline(ctx_.device, ctx_.format, shader_code);
- uniforms_.init(ctx_.device);
+ common_uniforms_.init(ctx_.device);
params_buffer_ = gpu_create_buffer(
ctx_.device, 16, WGPUBufferUsage_Uniform | WGPUBufferUsage_CopyDst);
}
void ThemeModulationEffect::update_bind_group(WGPUTextureView input_view) {
pp_update_bind_group(ctx_.device, pipeline_, &bind_group_, input_view,
- uniforms_.get(), params_buffer_);
+ common_uniforms_.get(), params_buffer_);
}
void ThemeModulationEffect::render(WGPURenderPassEncoder pass, float time,
@@ -79,7 +81,7 @@ void ThemeModulationEffect::render(WGPURenderPassEncoder pass, float time,
.beat = beat,
.audio_intensity = intensity,
};
- uniforms_.update(ctx_.queue, u);
+ common_uniforms_.update(ctx_.queue, u);
// Alternate between bright and dark every 4 seconds (2 pattern changes)
// Music patterns change every 2 seconds at 120 BPM