diff options
Diffstat (limited to 'src/gpu/effects/moving_ellipse_effect.cc')
| -rw-r--r-- | src/gpu/effects/moving_ellipse_effect.cc | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/gpu/effects/moving_ellipse_effect.cc b/src/gpu/effects/moving_ellipse_effect.cc index 9866f20..bbd3c08 100644 --- a/src/gpu/effects/moving_ellipse_effect.cc +++ b/src/gpu/effects/moving_ellipse_effect.cc @@ -13,17 +13,9 @@ MovingEllipseEffect::MovingEllipseEffect(const GpuContext& ctx) : Effect(ctx) { bindings, 1); pass_.vertex_count = 3; } -void MovingEllipseEffect::render(WGPURenderPassEncoder pass, float t, float b, - float i, float a) { - const CommonPostProcessUniforms u = { - .resolution = {(float)width_, (float)height_}, - ._pad = {0.0f, 0.0f}, - .aspect_ratio = a, - .time = t, - .beat = b, - .audio_intensity = i, - }; - uniforms_.update(ctx_.queue, u); +void MovingEllipseEffect::render(WGPURenderPassEncoder pass, + const CommonPostProcessUniforms& uniforms) { + uniforms_.update(ctx_.queue, uniforms); wgpuRenderPassEncoderSetPipeline(pass, pass_.pipeline); wgpuRenderPassEncoderSetBindGroup(pass, 0, pass_.bind_group, 0, nullptr); wgpuRenderPassEncoderDraw(pass, 3, 1, 0, 0); |
