2 #define _GLOW_EFFECT_H 1
4 // Glow: Cut out the highlights of the image (everything above a certain threshold),
5 // blur them, and overlay them onto the original image.
11 class HighlightCutoffEffect;
13 class GlowEffect : public Effect {
16 virtual std::string effect_type_id() const { return "GlowEffect"; }
18 virtual bool needs_srgb_primaries() const { return false; }
20 virtual void rewrite_graph(EffectChain *graph, Node *self);
21 virtual bool set_float(const std::string &key, float value);
23 virtual std::string output_fragment_shader() {
26 virtual void set_gl_state(GLuint glsl_program_num, const std::string &prefix, unsigned *sampler_num) {
32 HighlightCutoffEffect *cutoff;
36 // An effect that cuts out only the highlights of an image;
37 // anything at the cutoff or below is set to 0.0, and then all other pixels
38 // get the cutoff subtracted. Used only as part of GlowEffect.
40 class HighlightCutoffEffect : public Effect {
42 HighlightCutoffEffect();
43 virtual std::string effect_type_id() const { return "HighlightCutoffEffect"; }
44 std::string output_fragment_shader();
50 #endif // !defined(_GLOW_EFFECT_H)