summaryrefslogtreecommitdiff
path: root/src/gpu/effects/chroma_aberration_effect.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/effects/chroma_aberration_effect.cc')
-rw-r--r--src/gpu/effects/chroma_aberration_effect.cc38
1 files changed, 0 insertions, 38 deletions
diff --git a/src/gpu/effects/chroma_aberration_effect.cc b/src/gpu/effects/chroma_aberration_effect.cc
deleted file mode 100644
index 3a51965..0000000
--- a/src/gpu/effects/chroma_aberration_effect.cc
+++ /dev/null
@@ -1,38 +0,0 @@
-// This file is part of the 64k demo project.
-// It implements the ChromaAberrationEffect with parameterization.
-
-#include "gpu/demo_effects.h"
-#include "gpu/effects/post_process_helper.h"
-#include "gpu/gpu.h"
-
-// --- ChromaAberrationEffect ---
-
-// Backward compatibility constructor (delegates to parameterized constructor)
-ChromaAberrationEffect::ChromaAberrationEffect(const GpuContext& ctx)
- : ChromaAberrationEffect(ctx, ChromaAberrationParams{}) {
-}
-
-// Parameterized constructor
-ChromaAberrationEffect::ChromaAberrationEffect(
- const GpuContext& ctx, const ChromaAberrationParams& params)
- : PostProcessEffect(ctx), params_(params) {
- pipeline_ = create_post_process_pipeline(ctx_.device, ctx_.format,
- chroma_aberration_shader_wgsl);
- params_buffer_.init(ctx_.device);
-}
-
-void ChromaAberrationEffect::render(WGPURenderPassEncoder pass,
- const CommonPostProcessUniforms& uniforms) {
- // Update uniforms with current state and parameters
- uniforms_.update(ctx_.queue, uniforms);
- params_buffer_.update(ctx_.queue, params_);
-
- wgpuRenderPassEncoderSetPipeline(pass, pipeline_);
- wgpuRenderPassEncoderSetBindGroup(pass, 0, bind_group_, 0, nullptr);
- wgpuRenderPassEncoderDraw(pass, 3, 1, 0, 0);
-}
-
-void ChromaAberrationEffect::update_bind_group(WGPUTextureView input_view) {
- pp_update_bind_group(ctx_.device, pipeline_, &bind_group_, input_view,
- uniforms_.get(), params_buffer_.get());
-}