]> git.sesse.net Git - movit/blob - mix_effect.h
Do not call autoheader, since we do not use config.h.
[movit] / mix_effect.h
1 #ifndef _MOVIT_MIX_EFFECT_H
2 #define _MOVIT_MIX_EFFECT_H 1
3
4 // Combine two images: a*x + b*y. If you set a within [0,1] and b=1-a,
5 // you will get a fade; if not, you may get surprising results (consider alpha).
6
7 #include <string>
8
9 #include "effect.h"
10
11 class MixEffect : public Effect {
12 public:
13         MixEffect();
14         virtual std::string effect_type_id() const { return "MixEffect"; }
15         std::string output_fragment_shader();
16
17         virtual bool needs_srgb_primaries() const { return false; }
18         virtual unsigned num_inputs() const { return 2; }
19
20         // TODO: In the common case where a+b=1, it would be useful to be able to set
21         // alpha_handling() to INPUT_PREMULTIPLIED_ALPHA_KEEP_BLANK. However, right now
22         // we have no way of knowing that at instantiation time.
23
24 private:
25         float strength_first, strength_second;
26 };
27
28 #endif // !defined(_MOVIT_MIX_EFFECT_H)