X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=vignette_effect.h;h=926a5be0e0e5dd794c72b2ee0c7c507bedbee919;hp=737a834cb68556a063404063a0e92a18f5be88c9;hb=90ac46cdc5845432df13385f946c63b5496c685e;hpb=cfc161e0289c2169d4835c48751ff56b97355eb2 diff --git a/vignette_effect.h b/vignette_effect.h index 737a834..926a5be 100644 --- a/vignette_effect.h +++ b/vignette_effect.h @@ -4,7 +4,7 @@ // A circular vignette, falling off as cos² of the distance from the center // (the classic formula for approximating a real lens). -#include +#include #include #include "effect.h" @@ -19,13 +19,16 @@ public: virtual bool needs_srgb_primaries() const { return false; } virtual AlphaHandling alpha_handling() const { return DONT_CARE_ALPHA_TYPE; } + virtual bool one_to_one_sampling() const { return true; } virtual void inform_input_size(unsigned input_num, unsigned width, unsigned height); void set_gl_state(GLuint glsl_program_num, const std::string &prefix, unsigned *sampler_num); private: - Point2D center, aspect_correction; + Point2D center; + Point2D uniform_aspect_correction, uniform_flipped_center; float radius, inner_radius; + float uniform_pihalf_div_radius; }; } // namespace movit