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 std::string effect_type_id() const override { return "UnsharpMaskEffect"; }
31 bool needs_srgb_primaries() const override { return false; }
33 void rewrite_graph(EffectChain *graph, Node *self) override;
34 bool set_float(const std::string &key, float value) override;
36 std::string output_fragment_shader() override {
39 void set_gl_state(GLuint glsl_program_num, const std::string &prefix, unsigned *sampler_num) override {
50 #endif // !defined(_MOVIT_UNSHARP_MASK_EFFECT_H)