X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=blur_effect.cpp;h=6c1fd3af6ddcab1495e8d0ae53f2635630f07b50;hp=adffe089a6d452d5f06a2c9907710aa152ee1f6f;hb=f85e35e129f2395cb03867feb804e5a4badc594e;hpb=1bd97eb70a6fcb913bf954e369bc1a90ba17f74e diff --git a/blur_effect.cpp b/blur_effect.cpp index adffe08..6c1fd3a 100644 --- a/blur_effect.cpp +++ b/blur_effect.cpp @@ -208,9 +208,8 @@ void SingleBlurPassEffect::set_gl_state(GLuint glsl_program_num, const string &p float w2 = weight[base_pos + 1]; float pos1 = base_pos / (float)size; - float pos2 = (base_pos + 1) / (float)size; float pos, total_weight; - combine_two_samples(w1, w2, pos1, pos2, num_subtexels, inv_num_subtexels, &pos, &total_weight, NULL); + combine_two_samples(w1, w2, pos1, 1.0 / (float)size, size, num_subtexels, inv_num_subtexels, &pos, &total_weight, NULL); uniform_samples[2 * i + 0] = pos; uniform_samples[2 * i + 1] = total_weight;