From: Steinar H. Gunderson Date: Fri, 12 Oct 2012 00:20:17 +0000 (+0200) Subject: can_output_linear_gamma() should never return true for float inputs. X-Git-Tag: 1.0~310 X-Git-Url: https://git.sesse.net/?p=movit;a=commitdiff_plain;h=58094bb7c80300a2f67a7558d755abf5705c57df can_output_linear_gamma() should never return true for float inputs. --- diff --git a/flat_input.h b/flat_input.h index 1820eaf..39419b1 100644 --- a/flat_input.h +++ b/flat_input.h @@ -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();