File: multiply_effect.h

package info (click to toggle)
movit 1.7.2-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 3,248 kB
  • sloc: cpp: 16,677; sh: 3,940; makefile: 167
file content (29 lines) | stat: -rw-r--r-- 778 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef _MOVIT_MULTIPLY_EFFECT_H
#define _MOVIT_MULTIPLY_EFFECT_H 1

// An effect that multiplies every pixel by a constant (separate for each of
// R, G, B, A). A common use would be to reduce the alpha of an overlay before
// sending it through OverlayEffect, e.g. with R=G=B=A=0.3 to get 30% alpha
// (remember, alpha is premultiplied).

#include <epoxy/gl.h>
#include <string>

#include "effect.h"

namespace movit {

class MultiplyEffect : public Effect {
public:
	MultiplyEffect();
	std::string effect_type_id() const override { return "MultiplyEffect"; }
	std::string output_fragment_shader() override;
	bool strong_one_to_one_sampling() const override { return true; }

private:
	RGBATuple factor;
};

}  // namespace movit

#endif // !defined(_MOVIT_MULTIPLY_EFFECT_H)