1 #ifndef _UNSHARP_MASK_EFFECT_H
2 #define _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.
18 class UnsharpMaskEffect : public Effect {
21 virtual std::string effect_type_id() const { return "UnsharpMaskEffect"; }
23 virtual bool needs_srgb_primaries() const { return false; }
25 virtual void rewrite_graph(EffectChain *graph, Node *self);
26 virtual bool set_float(const std::string &key, float value);
28 virtual std::string output_fragment_shader() {
31 virtual void set_gl_state(GLuint glsl_program_num, const std::string &prefix, unsigned *sampler_num) {
40 #endif // !defined(_UNSHARP_MASK_EFFECT_H)