]> git.sesse.net Git - movit/blobdiff - mix_effect.h
Add a glow effect, and an effect that linearly mixes two sources (because glow needed...
[movit] / mix_effect.h
diff --git a/mix_effect.h b/mix_effect.h
new file mode 100644 (file)
index 0000000..7342b90
--- /dev/null
@@ -0,0 +1,20 @@
+#ifndef _MIX_EFFECT_H
+#define _MIX_EFFECT_H 1
+
+// Combine two images: a*x + b*y. (If you set a within [0,1] and b=1-a, you will get a fade.)
+
+#include "effect.h"
+
+class MixEffect : public Effect {
+public:
+       MixEffect();
+       std::string output_fragment_shader();
+
+       virtual bool needs_srgb_primaries() const { return false; }
+       virtual unsigned num_inputs() const { return 2; }
+
+private:
+       float strength_first, strength_second;
+};
+
+#endif // !defined(_MIX_EFFECT_H)