X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=saturation_effect.h;h=f4d69e680ddda7b03a730a0724452d72f6e8394f;hp=6cfc3d0ee0392c49d18e5a0b3f782c40fc5889e9;hb=ac4fc36aa70ffefb6b9632dc0abea5cbbce5387b;hpb=17c083aad45a10df14c38cfe879a87220dfd4fb9 diff --git a/saturation_effect.h b/saturation_effect.h index 6cfc3d0..f4d69e6 100644 --- a/saturation_effect.h +++ b/saturation_effect.h @@ -1,15 +1,25 @@ -#ifndef _SATURATION_EFFECT_H -#define _SATURATION_EFFECT_H 1 +#ifndef _MOVIT_SATURATION_EFFECT_H +#define _MOVIT_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 #include "effect.h" class SaturationEffect : public Effect { public: SaturationEffect(); + 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; }; -#endif // !defined(_SATURATION_EFFECT_H) +#endif // !defined(_MOVIT_SATURATION_EFFECT_H)