X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=glow_effect.h;h=02520d7bd9ad8f87f38dd9c4365f63be9e85851f;hp=c0ac9ce5ee4163516ee2806557196447786099a7;hb=refs%2Fheads%2F1.3.x-release;hpb=b10c546f579c7ccb5939161e61a71cd18a3f9bbd diff --git a/glow_effect.h b/glow_effect.h index c0ac9ce..02520d7 100644 --- a/glow_effect.h +++ b/glow_effect.h @@ -1,17 +1,22 @@ -#ifndef _GLOW_EFFECT_H -#define _GLOW_EFFECT_H 1 +#ifndef _MOVIT_GLOW_EFFECT_H +#define _MOVIT_GLOW_EFFECT_H 1 // Glow: Cut out the highlights of the image (everything above a certain threshold), // blur them, and overlay them onto the original image. -// -// FIXME: This might be broken after MixEffect started working in premultiplied alpha. -// We need to think about how this is going to work, and then add a test. + +#include +#include +#include #include "effect.h" +namespace movit { + class BlurEffect; -class MixEffect; +class EffectChain; class HighlightCutoffEffect; +class MixEffect; +class Node; class GlowEffect : public Effect { public: @@ -45,9 +50,14 @@ public: HighlightCutoffEffect(); virtual std::string effect_type_id() const { return "HighlightCutoffEffect"; } std::string output_fragment_shader(); + + virtual AlphaHandling alpha_handling() const { return INPUT_PREMULTIPLIED_ALPHA_KEEP_BLANK; } + virtual bool one_to_one_sampling() const { return true; } private: float cutoff; }; -#endif // !defined(_GLOW_EFFECT_H) +} // namespace movit + +#endif // !defined(_MOVIT_GLOW_EFFECT_H)