]> git.sesse.net Git - movit/blob - white_balance_effect.h
Support pad/crop from bottom, not just from the top.
[movit] / white_balance_effect.h
1 #ifndef _MOVIT_WHITE_BALANCE_EFFECT_H
2 #define _MOVIT_WHITE_BALANCE_EFFECT_H 1
3
4 // Color correction in LMS color space.
5
6 #include <GL/glew.h>
7 #include <string>
8
9 #include "effect.h"
10
11 namespace movit {
12
13 class WhiteBalanceEffect : public Effect {
14 public:
15         WhiteBalanceEffect();
16         virtual std::string effect_type_id() const { return "WhiteBalanceEffect"; }
17         virtual AlphaHandling alpha_handling() const { return DONT_CARE_ALPHA_TYPE; }
18         std::string output_fragment_shader();
19
20         void set_gl_state(GLuint glsl_program_num, const std::string &prefix, unsigned *sampler_num);
21
22 private:
23         // The neutral color, in linear sRGB.
24         RGBTriplet neutral_color;
25
26         // Output color temperature (in Kelvins).
27         // Choosing 6500 will lead to no color cast (ie., the neutral color becomes perfectly gray).
28         float output_color_temperature;
29 };
30
31 }  // namespace movit
32
33 #endif // !defined(_MOVIT_WHITE_BALANCE_EFFECT_H)