X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=saturation_effect.h;h=27b1d006c691a23fbf589509b340555e5c9d4562;hp=3f057e9a4b5e00f2cdc5b0769e27328e14435009;hb=f6ccf310656ba0c218574654fbf8e794041efeaf;hpb=19a5a44c107dbba0e784ffb7ffcbcd8dd8e91119 diff --git a/saturation_effect.h b/saturation_effect.h index 3f057e9..27b1d00 100644 --- a/saturation_effect.h +++ b/saturation_effect.h @@ -1,12 +1,20 @@ #ifndef _SATURATION_EFFECT_H #define _SATURATION_EFFECT_H 1 +// A simple desaturation/saturation effect. We use the Rec. 709 +// definition of luminance (in linear light, of course) and linearly +// interpolate between that (saturation=0) and the original signal +// (saturation=1). Extrapolating that curve further (ie., saturation > 1) +// gives us increased saturation if so desired. + #include "effect.h" class SaturationEffect : public Effect { public: SaturationEffect(); - std::string output_glsl(); + virtual std::string effect_type_id() const { return "SaturationEffect"; } + virtual AlphaHandling alpha_handling() const { return DONT_CARE_ALPHA_TYPE; } + std::string output_fragment_shader(); private: float saturation;