1 #ifndef _MOVIT_VIGNETTE_EFFECT_H
2 #define _MOVIT_VIGNETTE_EFFECT_H 1
4 // A circular vignette, falling off as cosĀ² of the distance from the center
5 // (the classic formula for approximating a real lens).
14 class VignetteEffect : public Effect {
17 virtual std::string effect_type_id() const { return "VignetteEffect"; }
18 std::string output_fragment_shader();
20 virtual bool needs_srgb_primaries() const { return false; }
21 virtual AlphaHandling alpha_handling() const { return DONT_CARE_ALPHA_TYPE; }
22 virtual bool one_to_one_sampling() const { return true; }
24 virtual void inform_input_size(unsigned input_num, unsigned width, unsigned height);
25 void set_gl_state(GLuint glsl_program_num, const std::string &prefix, unsigned *sampler_num);
29 Point2D uniform_aspect_correction, uniform_flipped_center;
30 float radius, inner_radius;
31 float uniform_pihalf_div_radius;
36 #endif // !defined(_MOVIT_VIGNETTE_EFFECT_H)