1 #ifndef _MOVIT_LUMA_MIX_EFFECT_H
2 #define _MOVIT_LUMA_MIX_EFFECT_H 1
4 // Fade between two images based on a third monochrome one; lighter pixels
5 // will be faded before darker pixels. This allows a wide range of different
6 // video wipes implemented using a single effect.
8 // Note that despite the name, the third input's _red_ channel is what's used
9 // for transitions; there is no luma calculation done. If you need that,
10 // put a SaturationEffect in front to desaturate (which calculates luma).
18 class LumaMixEffect : public Effect {
21 virtual std::string effect_type_id() const { return "LumaMixEffect"; }
22 std::string output_fragment_shader();
23 virtual void set_gl_state(GLuint glsl_program_num, const std::string &prefix, unsigned *sampler_num);
25 virtual bool needs_srgb_primaries() const { return false; }
26 virtual unsigned num_inputs() const { return 3; }
27 virtual AlphaHandling alpha_handling() const { return INPUT_PREMULTIPLIED_ALPHA_KEEP_BLANK; }
30 float transition_width, progress;
35 #endif // !defined(_MOVIT_MIX_EFFECT_H)