X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=white_balance_effect.h;h=01dcc7e24d18a902eec255fb7f056dfbb43d303d;hp=f438b91507a00b579d9eac697a3f619ac4527096;hb=eff011224abc5dc81f801f3ea44572287a55bcac;hpb=7ea0b3a5be9bafaa2d1fa5a17ce285a725ce132b diff --git a/white_balance_effect.h b/white_balance_effect.h index f438b91..01dcc7e 100644 --- a/white_balance_effect.h +++ b/white_balance_effect.h @@ -5,6 +5,7 @@ #include #include +#include #include "effect.h" @@ -13,11 +14,12 @@ namespace movit { class WhiteBalanceEffect : public Effect { public: WhiteBalanceEffect(); - virtual std::string effect_type_id() const { return "WhiteBalanceEffect"; } - virtual AlphaHandling alpha_handling() const { return DONT_CARE_ALPHA_TYPE; } - std::string output_fragment_shader(); + std::string effect_type_id() const override { return "WhiteBalanceEffect"; } + AlphaHandling alpha_handling() const override { return DONT_CARE_ALPHA_TYPE; } + bool strong_one_to_one_sampling() const override { return true; } + std::string output_fragment_shader() override; - void set_gl_state(GLuint glsl_program_num, const std::string &prefix, unsigned *sampler_num); + void set_gl_state(GLuint glsl_program_num, const std::string &prefix, unsigned *sampler_num) override; private: // The neutral color, in linear sRGB. @@ -26,6 +28,8 @@ private: // Output color temperature (in Kelvins). // Choosing 6500 will lead to no color cast (ie., the neutral color becomes perfectly gray). float output_color_temperature; + + Eigen::Matrix3d uniform_correction_matrix; }; } // namespace movit