1 #include "luma_mix_effect.h"
2 #include "effect_util.h"
9 LumaMixEffect::LumaMixEffect()
10 : transition_width(1.0f), progress(0.5f), inverse(0)
12 register_float("transition_width", &transition_width);
13 register_float("progress", &progress);
14 register_int("inverse", &inverse);
15 register_uniform_bool("bool_inverse", &uniform_inverse);
16 register_uniform_float("progress_mul_w_plus_one", &uniform_progress_mul_w_plus_one);
19 string LumaMixEffect::output_fragment_shader()
21 return read_file("luma_mix_effect.frag");
24 void LumaMixEffect::set_gl_state(GLuint glsl_program_num, const string &prefix, unsigned *sampler_num)
26 Effect::set_gl_state(glsl_program_num, prefix, sampler_num);
27 uniform_progress_mul_w_plus_one = progress * (transition_width + 1.0);
28 uniform_inverse = inverse;