X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=multiply_effect.h;fp=multiply_effect.h;h=8de261aebaff82465b6e9c3671abb76b30b1db45;hb=e33b485dcb7bdbe056f6511945d5eb118c085d65;hp=0000000000000000000000000000000000000000;hpb=5c97329dd35909847e2120b0b368b2723ffe5a44;p=movit diff --git a/multiply_effect.h b/multiply_effect.h new file mode 100644 index 0000000..8de261a --- /dev/null +++ b/multiply_effect.h @@ -0,0 +1,24 @@ +#ifndef _MOVIT_MULTIPLY_EFFECT_H +#define _MOVIT_MULTIPLY_EFFECT_H 1 + +// An effect that multiplies every pixel by a constant (separate for each of +// R, G, B, A). A common use would be to reduce the alpha of an overlay before +// sending it through OverlayEffect, e.g. with R=G=B=A=0.3 to get 30% alpha +// (remember, alpha is premultiplied). + +#include +#include + +#include "effect.h" + +class MultiplyEffect : public Effect { +public: + MultiplyEffect(); + virtual std::string effect_type_id() const { return "MultiplyEffect"; } + std::string output_fragment_shader(); + +private: + RGBATuple factor; +}; + +#endif // !defined(_MOVIT_MULTIPLY_EFFECT_H)