]> git.sesse.net Git - movit/blob - vignette_effect.h
Run include-what-you-use over all of movit. Some hand tuning.
[movit] / vignette_effect.h
1 #ifndef _VIGNETTE_EFFECT_H
2 #define _VIGNETTE_EFFECT_H 1
3
4 // A circular vignette, falling off as cosĀ² of the distance from the center
5 // (the classic formula for approximating a real lens).
6
7 #include <GL/glew.h>
8 #include <string>
9
10 #include "effect.h"
11
12 class VignetteEffect : public Effect {
13 public:
14         VignetteEffect();
15         virtual std::string effect_type_id() const { return "VignetteEffect"; }
16         std::string output_fragment_shader();
17
18         virtual bool needs_srgb_primaries() const { return false; }
19         virtual AlphaHandling alpha_handling() const { return DONT_CARE_ALPHA_TYPE; }
20
21         void set_gl_state(GLuint glsl_program_num, const std::string &prefix, unsigned *sampler_num);
22
23 private:
24         Point2D center;
25         float radius, inner_radius;
26 };
27
28 #endif // !defined(_VIGNETTE_EFFECT_H)