1 #include "luma_mix_effect.h"
2 #include "effect_util.h"
9 LumaMixEffect::LumaMixEffect()
10 : transition_width(1.0f), progress(0.5f)
12 register_float("transition_width", &transition_width);
13 register_float("progress", &progress);
16 string LumaMixEffect::output_fragment_shader()
18 return read_file("luma_mix_effect.frag");
21 void LumaMixEffect::set_gl_state(GLuint glsl_program_num, const string &prefix, unsigned *sampler_num)
23 Effect::set_gl_state(glsl_program_num, prefix, sampler_num);
24 set_uniform_float(glsl_program_num, prefix, "progress_mul_w_plus_one", progress * (transition_width + 1.0));