]> git.sesse.net Git - movit/commitdiff
FlatInput can only auto-expand from linear or sRGB, not e.g. Rec. 601/709 gamma.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 8 Oct 2012 13:01:08 +0000 (15:01 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 8 Oct 2012 13:01:08 +0000 (15:01 +0200)
flat_input.h

index 3bcdc76d61a46a4555e7f8ab1b822ff101dc6efa..2e14488ea7d983da1cad04ea6a31fb99d4b06fb3 100644 (file)
@@ -17,7 +17,10 @@ public:
        void finalize();
 
        // TODO: Check that we actually have the required extension.
-       virtual bool can_output_linear_gamma() const { return true; }
+       virtual bool can_output_linear_gamma() const {
+               return (image_format.gamma_curve == GAMMA_LINEAR ||
+                       image_format.gamma_curve == GAMMA_sRGB);
+       }
 
        std::string output_fragment_shader();