X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=vignette_effect.h;h=d13bf85d01c36b47a47cdd53641efd8f6f5fe6ad;hp=b8e0f68c7f1c5cfe16bc82fef2d9c5abcb9fd83f;hb=6278a96c8e0ea5df9d831ecd5b893f831ddc8297;hpb=17c083aad45a10df14c38cfe879a87220dfd4fb9 diff --git a/vignette_effect.h b/vignette_effect.h index b8e0f68..d13bf85 100644 --- a/vignette_effect.h +++ b/vignette_effect.h @@ -1,14 +1,24 @@ #ifndef _VIGNETTE_EFFECT_H #define _VIGNETTE_EFFECT_H 1 +// A circular vignette, falling off as cos² of the distance from the center +// (the classic formula for approximating a real lens). + +#include +#include + #include "effect.h" class VignetteEffect : public Effect { public: VignetteEffect(); + virtual std::string effect_type_id() const { return "VignetteEffect"; } std::string output_fragment_shader(); - void set_uniforms(GLuint glsl_program_num, const std::string &prefix); + virtual bool needs_srgb_primaries() const { return false; } + virtual AlphaHandling alpha_handling() const { return DONT_CARE_ALPHA_TYPE; } + + void set_gl_state(GLuint glsl_program_num, const std::string &prefix, unsigned *sampler_num); private: Point2D center;