1 #ifndef _MOVIT_UNSHARP_MASK_EFFECT_H
2 #define _MOVIT_UNSHARP_MASK_EFFECT_H 1
4 // Unsharp mask is probably the most popular way of doing sharpening today,
5 // although it does not always deliver the best results (it is very prone
6 // to haloing). It simply consists of removing a blurred copy of the image from
7 // itself (multiplied by some strength factor). In this aspect, it's similar to
8 // glow, except by subtracting instead of adding.
10 // See DeconvolutionSharpenEffect for a different, possibly better
11 // sharpening algorithm.
26 class UnsharpMaskEffect : public Effect {
29 virtual std::string effect_type_id() const { return "UnsharpMaskEffect"; }
31 virtual bool needs_srgb_primaries() const { return false; }
33 virtual void rewrite_graph(EffectChain *graph, Node *self);
34 virtual bool set_float(const std::string &key, float value);
36 virtual std::string output_fragment_shader() {
39 virtual void set_gl_state(GLuint glsl_program_num, const std::string &prefix, unsigned *sampler_num) {
50 #endif // !defined(_MOVIT_UNSHARP_MASK_EFFECT_H)