X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=lift_gamma_gain_effect.h;h=36f6a77370461c2c66b8d6b5e60b11e298c21df4;hp=b57a89964204fa5622635ac852d8678721a090ce;hb=5fea9e6cd7aba98acc8b026801d268a3111eba63;hpb=e8650c7b7814c5beef59059b8acac3e5e7b8ddc6 diff --git a/lift_gamma_gain_effect.h b/lift_gamma_gain_effect.h index b57a899..36f6a77 100644 --- a/lift_gamma_gain_effect.h +++ b/lift_gamma_gain_effect.h @@ -16,15 +16,19 @@ // rest of the curve relatively little. Thus, we actually convert to gamma 2.2 // before lift, and then back again afterwards. (Gain and gamma are, // up to constants, commutative with the de-gamma operation.) +// +// Also, gamma is a case where we would not want premultiplied alpha. +// Thus, we have to divide away alpha first, and then re-multiply it back later. #include "effect.h" class LiftGammaGainEffect : public Effect { public: LiftGammaGainEffect(); + virtual std::string effect_type_id() const { return "LiftGammaGainEffect"; } std::string output_fragment_shader(); - void set_uniforms(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); private: RGBTriplet lift, gamma, gain;