X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=blur_effect.cpp;h=6c1fd3af6ddcab1495e8d0ae53f2635630f07b50;hp=adffe089a6d452d5f06a2c9907710aa152ee1f6f;hb=532dc15e43ee8c26de0e9f13bc56d92b4a6b1379;hpb=90ac46cdc5845432df13385f946c63b5496c685e 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;