X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=alpha_division_effect.h;h=554a1868751c969c4688bab4464b26f276fbdef1;hp=e700112fb2a909c108c2ddb48ccbb3b96d5ab0ed;hb=8ee9712bae3cff206b3e3205748633edb33cbbcf;hpb=caa05550e868db406e4b54e69d60b5573f59cb60 diff --git a/alpha_division_effect.h b/alpha_division_effect.h index e700112..554a186 100644 --- a/alpha_division_effect.h +++ b/alpha_division_effect.h @@ -1,15 +1,22 @@ -#ifndef _ALPHA_DIVISION_EFFECT_H -#define _ALPHA_DIVISION_EFFECT_H 1 +#ifndef _MOVIT_ALPHA_DIVISION_EFFECT_H +#define _MOVIT_ALPHA_DIVISION_EFFECT_H 1 -// Convert premultiplied alpha to postmultiplied alpha, simply by multiplying. +// Convert postmultiplied alpha to premultiplied alpha, simply by dividing. + +#include #include "effect.h" +namespace movit { + class AlphaDivisionEffect : public Effect { public: AlphaDivisionEffect() {} - virtual std::string effect_type_id() const { return "AlphaDivisionEffect"; } - std::string output_fragment_shader(); + std::string effect_type_id() const override { return "AlphaDivisionEffect"; } + std::string output_fragment_shader() override; + bool strong_one_to_one_sampling() const override { return true; } }; -#endif // !defined(_ALPHA_DIVISION_EFFECT_H) +} // namespace movit + +#endif // !defined(_MOVIT_ALPHA_DIVISION_EFFECT_H)