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 3bcdc76..2e14488 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();