summaryrefslogtreecommitdiff
path: root/src/effects/ntsc_effect.h
blob: b975c4d9fa9d7c043ca3e46ba78fa4082ec82bab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// NTSC post-process effects: RGB and YIQ input variants.
#pragma once
#include "effects/shaders.h"
#include "gpu/wgsl_effect.h"

// RGB input: converts RGB → YIQ internally (standard post-process use).
struct Ntsc : public WgslEffect {
  Ntsc(const GpuContext& ctx, const std::vector<std::string>& inputs,
       const std::vector<std::string>& outputs, float start_time,
       float end_time)
      : WgslEffect(ctx, inputs, outputs, start_time, end_time,
                   ntsc_rgb_shader_wgsl) {
  }
};

// YIQ input: input texture already stores luma/chroma/phase (e.g. RotatingCube
// output).
struct NtscYiq : public WgslEffect {
  NtscYiq(const GpuContext& ctx, const std::vector<std::string>& inputs,
          const std::vector<std::string>& outputs, float start_time,
          float end_time)
      : WgslEffect(ctx, inputs, outputs, start_time, end_time,
                   ntsc_yiq_shader_wgsl) {
  }
};