X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=lift_gamma_gain_effect.h;h=bd1ec16a6d8743e6dfa83cd9848e78b959636a7c;hp=131957009a37bd35ccc954035f05a85ac03e358f;hb=ac040289928cdf3554ce884575afab17565e6c67;hpb=f99ad333a7acbb6c8c995dbb036484ae8940c490 diff --git a/lift_gamma_gain_effect.h b/lift_gamma_gain_effect.h index 1319570..bd1ec16 100644 --- a/lift_gamma_gain_effect.h +++ b/lift_gamma_gain_effect.h @@ -16,6 +16,12 @@ // 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 +#include #include "effect.h" @@ -23,6 +29,7 @@ class LiftGammaGainEffect : public Effect { public: LiftGammaGainEffect(); virtual std::string effect_type_id() const { return "LiftGammaGainEffect"; } + virtual AlphaHandling alpha_handling() const { return INPUT_PREMULTIPLIED_ALPHA_KEEP_BLANK; } std::string output_fragment_shader(); void set_gl_state(GLuint glsl_program_num, const std::string &prefix, unsigned *sampler_num);