summaryrefslogtreecommitdiff
path: root/src/gpu/effects/chroma_aberration_effect.cc
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-01 01:41:01 +0100
committerskal <pascal.massimino@gmail.com>2026-02-01 01:41:01 +0100
commite6e34e551a73e65301685071445aaec9aaf60fd2 (patch)
tree40b374b0137abc71c121ef5f94d1a5ba645108cd /src/gpu/effects/chroma_aberration_effect.cc
parent709067df5303ddf0715f56903ccfdb877cb4db7e (diff)
Refactor: Move common GPU fields to base Effect classes
Moved WGPUDevice, WGPUQueue, and GpuBuffer uniforms_ into the base Effect and PostProcessEffect classes. Updated all derived effect classes to use these inherited members and refactored their constructors. Also fixed associated compilation errors in test files and adjusted a printf statement.
Diffstat (limited to 'src/gpu/effects/chroma_aberration_effect.cc')
-rw-r--r--src/gpu/effects/chroma_aberration_effect.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gpu/effects/chroma_aberration_effect.cc b/src/gpu/effects/chroma_aberration_effect.cc
index 5acc1f4..ef9e963 100644
--- a/src/gpu/effects/chroma_aberration_effect.cc
+++ b/src/gpu/effects/chroma_aberration_effect.cc
@@ -8,11 +8,11 @@
ChromaAberrationEffect::ChromaAberrationEffect(WGPUDevice device,
WGPUQueue queue,
WGPUTextureFormat format)
- : device_(device), queue_(queue) {
+ : PostProcessEffect(device, queue) {
uniforms_ =
- gpu_create_buffer(device, sizeof(float) * 4,
+ gpu_create_buffer(device_, sizeof(float) * 4,
WGPUBufferUsage_Uniform | WGPUBufferUsage_CopyDst);
- pipeline_ = create_post_process_pipeline(device, format,
+ pipeline_ = create_post_process_pipeline(device_, format,
chroma_aberration_shader_wgsl);
}
void ChromaAberrationEffect::render(WGPURenderPassEncoder pass, float t,