]> git.sesse.net Git - movit/blob - multiply_effect.h
Do our own fp16 conversion in ResampleEffect.
[movit] / multiply_effect.h
1 #ifndef _MOVIT_MULTIPLY_EFFECT_H
2 #define _MOVIT_MULTIPLY_EFFECT_H 1
3
4 // An effect that multiplies every pixel by a constant (separate for each of
5 // R, G, B, A). A common use would be to reduce the alpha of an overlay before
6 // sending it through OverlayEffect, e.g. with R=G=B=A=0.3 to get 30% alpha
7 // (remember, alpha is premultiplied).
8
9 #include <GL/glew.h>
10 #include <string>
11
12 #include "effect.h"
13
14 namespace movit {
15
16 class MultiplyEffect : public Effect {
17 public:
18         MultiplyEffect();
19         virtual std::string effect_type_id() const { return "MultiplyEffect"; }
20         std::string output_fragment_shader();
21
22 private:
23         RGBATuple factor;
24 };
25
26 }  // namespace movit
27
28 #endif // !defined(_MOVIT_MULTIPLY_EFFECT_H)