]> git.sesse.net Git - movit/commitdiff
can_output_linear_gamma() should never return true for float inputs.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 12 Oct 2012 00:20:17 +0000 (02:20 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 12 Oct 2012 00:20:17 +0000 (02:20 +0200)
flat_input.h

index 1820eafda24c56248fcaa80b3af73caa7172d507..39419b1954fe5125fdd43386ca360a691c3f25f4 100644 (file)
@@ -18,8 +18,9 @@ public:
 
        // TODO: Check that we actually have the required extension.
        virtual bool can_output_linear_gamma() const {
-               return (image_format.gamma_curve == GAMMA_LINEAR ||
-                       image_format.gamma_curve == GAMMA_sRGB);
+               return (type == GL_UNSIGNED_BYTE &&
+                       (image_format.gamma_curve == GAMMA_LINEAR ||
+                        image_format.gamma_curve == GAMMA_sRGB));
        }
 
        std::string output_fragment_shader();