summaryrefslogtreecommitdiff
path: root/src/gpu/effects/solarize_effect.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/effects/solarize_effect.cc')
-rw-r--r--src/gpu/effects/solarize_effect.cc15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/gpu/effects/solarize_effect.cc b/src/gpu/effects/solarize_effect.cc
index 4f47218..cdb9354 100644
--- a/src/gpu/effects/solarize_effect.cc
+++ b/src/gpu/effects/solarize_effect.cc
@@ -9,17 +9,10 @@ SolarizeEffect::SolarizeEffect(const GpuContext& ctx) : PostProcessEffect(ctx) {
pipeline_ = create_post_process_pipeline(ctx_.device, ctx_.format,
solarize_shader_wgsl);
}
-void SolarizeEffect::render(WGPURenderPassEncoder pass, float t, float b,
- float i, float a) {
- const CommonPostProcessUniforms u = {
- .resolution = {(float)width_, (float)height_},
- .aspect_ratio = a,
- .time = t,
- .beat = b,
- .audio_intensity = i,
- };
- uniforms_.update(ctx_.queue, u);
- PostProcessEffect::render(pass, t, b, i, a);
+void SolarizeEffect::render(WGPURenderPassEncoder pass,
+ const CommonPostProcessUniforms& uniforms) {
+ uniforms_.update(ctx_.queue, uniforms);
+ PostProcessEffect::render(pass, uniforms);
}
void SolarizeEffect::update_bind_group(WGPUTextureView v) {
pp_update_bind_group(ctx_.device, pipeline_, &bind_group_, v, uniforms_.get(),