summaryrefslogtreecommitdiff
path: root/src/gpu/effects/distort_effect.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/effects/distort_effect.cc')
-rw-r--r--src/gpu/effects/distort_effect.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gpu/effects/distort_effect.cc b/src/gpu/effects/distort_effect.cc
index 589cdff..d11dfd7 100644
--- a/src/gpu/effects/distort_effect.cc
+++ b/src/gpu/effects/distort_effect.cc
@@ -6,12 +6,14 @@
// --- DistortEffect ---
DistortEffect::DistortEffect(const GpuContext& ctx)
- : DistortEffect(ctx, DistortParams()) {}
+ : DistortEffect(ctx, DistortParams()) {
+}
DistortEffect::DistEffect(const GpuContext& ctx, const DistortParams& params)
: PostProcessEffect(ctx), params_(params) {
- uniforms_ = gpu_create_buffer(ctx_.device, sizeof(DistortUniforms),
- WGPUBufferUsage_Uniform | WGPUBufferUsage_CopyDst);
+ uniforms_ =
+ gpu_create_buffer(ctx_.device, sizeof(DistortUniforms),
+ WGPUBufferUsage_Uniform | WGPUBufferUsage_CopyDst);
pipeline_ = create_post_process_pipeline(ctx_.device, ctx_.format,
distort_shader_wgsl);
}
@@ -33,5 +35,5 @@ void DistortEffect::render(WGPURenderPassEncoder pass, float t, float b,
}
void DistortEffect::update_bind_group(WGPUTextureView v) {
- pp_update_bind_group(ctx_.device, pipeline_, &bind_group_, v, uniforms_);
+ pp_update_bind_group(ctx_.device, pipeline_, &bind_group_, v, {}, uniforms_);
} \ No newline at end of file