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 std::string effect_type_id() const override { return "VignetteEffect"; }
18 std::string output_fragment_shader() override;
20 bool needs_srgb_primaries() const override { return false; }
21 AlphaHandling alpha_handling() const override { return DONT_CARE_ALPHA_TYPE; }
22 bool strong_one_to_one_sampling() const override { return true; }
24 void inform_input_size(unsigned input_num, unsigned width, unsigned height) override;
25 void set_gl_state(GLuint glsl_program_num, const std::string &prefix, unsigned *sampler_num) override;
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)