]> git.sesse.net Git - movit/commitdiff
Mark some appropriate effects as not needing sRGB primaries, and expand the comment...
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 5 Oct 2012 14:55:21 +0000 (16:55 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 5 Oct 2012 14:55:21 +0000 (16:55 +0200)
blur_effect.h
diffusion_effect.h
effect.h
vignette_effect.h

index d90f99aeaf75bb9a8de28bcfe3e0ec48bb141c74..3e516b76eba22cfb11c8441c59fe5a43ec0f6a61 100644 (file)
@@ -17,6 +17,8 @@ class BlurEffect : public Effect {
 public:
        BlurEffect();
 
+       virtual bool needs_srgb_primaries() const { return false; }
+
        virtual std::string output_fragment_shader() {
                assert(false);
        }
@@ -38,6 +40,7 @@ public:
        SingleBlurPassEffect();
        std::string output_fragment_shader();
 
+       virtual bool needs_srgb_primaries() const { return false; }
        virtual bool needs_texture_bounce() const { return true; }
        virtual bool needs_mipmaps() const { return true; }
 
index 4223d22aa8c0f1cf2f74b8ea2b42c2dba1bce7b7..3eab50294f4afcda38a8304c1d981474d1b6ecf8 100644 (file)
@@ -22,6 +22,8 @@ public:
        DiffusionEffect();
        std::string output_fragment_shader();
 
+       virtual bool needs_srgb_primaries() const { return false; }
+
        virtual void add_self_to_effect_chain(EffectChain *chain, const std::vector<Effect *> &input);
        virtual bool set_float(const std::string &key, float value);
 
index fcb752638115dd6297bccb918cd606dd3b535645..082c234c5292ebf7361326022b6eb918d16c8365 100644 (file)
--- a/effect.h
+++ b/effect.h
@@ -60,7 +60,9 @@ public:
        // set of RGB primaries; you would currently not get YCbCr
        // or something similar).
        //
-       // Again, most effects will want this.
+       // Again, most effects will want this, but you can set it to false
+       // if you process each channel independently, equally _and_
+       // in a linear fashion.
        virtual bool needs_srgb_primaries() const { return true; }
 
        // Whether this effect expects its input to come directly from
index c9a08bfd8f85091ec711175b274de77cb9b09359..2567e83c38844be7415a2428da01d1a4895dc93a 100644 (file)
@@ -11,6 +11,8 @@ public:
        VignetteEffect();
        std::string output_fragment_shader();
 
+       virtual bool needs_srgb_primaries() const { return false; }
+
        void set_uniforms(GLuint glsl_program_num, const std::string &prefix, unsigned *sampler_num);
 
 private: