summaryrefslogtreecommitdiff
path: root/src/effects/scratch_effect.h
blob: fb36a96edeb14e8431fd66b0b7f738af13d97977 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Scratch effect - film scratch overlay post-process
// Reads input buffer, additively blends scratch_lines() on top.

#pragma once
#include "gpu/effect.h"
#include "gpu/wgpu_resource.h"

class Scratch : public Effect {
 public:
  Scratch(const GpuContext& ctx, const std::vector<std::string>& inputs,
          const std::vector<std::string>& outputs, float start_time,
          float end_time);

  void render(WGPUCommandEncoder encoder, const UniformsSequenceParams& params,
              NodeRegistry& nodes) override;

 private:
  RenderPipeline pipeline_;
  BindGroup bind_group_;
};