From fdad0932f08649e69e824ee73a787671a5bc93a5 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Mon, 8 Oct 2012 15:01:08 +0200 Subject: [PATCH] FlatInput can only auto-expand from linear or sRGB, not e.g. Rec. 601/709 gamma. --- flat_input.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flat_input.h b/flat_input.h index 3bcdc76..2e14488 100644 --- a/flat_input.h +++ b/flat_input.h @@ -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(); -- 2.39.2