]> git.sesse.net Git - movit/blob - saturation_effect.h
Bump version number after support for external OpenGL textures (it was forgotten).
[movit] / saturation_effect.h
1 #ifndef _MOVIT_SATURATION_EFFECT_H
2 #define _MOVIT_SATURATION_EFFECT_H 1
3
4 // A simple desaturation/saturation effect. We use the Rec. 709
5 // definition of luminance (in linear light, of course) and linearly
6 // interpolate between that (saturation=0) and the original signal
7 // (saturation=1). Extrapolating that curve further (ie., saturation > 1)
8 // gives us increased saturation if so desired.
9
10 #include <string>
11
12 #include "effect.h"
13
14 namespace movit {
15
16 class SaturationEffect : public Effect {
17 public:
18         SaturationEffect();
19         virtual std::string effect_type_id() const { return "SaturationEffect"; }
20         virtual AlphaHandling alpha_handling() const { return DONT_CARE_ALPHA_TYPE; }
21         virtual bool one_to_one_sampling() const { return true; }
22         std::string output_fragment_shader();
23
24 private:
25         float saturation;
26 };
27
28 }  // namespace movit
29
30 #endif // !defined(_MOVIT_SATURATION_EFFECT_H)