]> git.sesse.net Git - movit/blobdiff - blur_effect.cpp
Some microoptimizations in combine_two_samples(). Saves about 4% in ResampleEffect...
[movit] / blur_effect.cpp
index adffe089a6d452d5f06a2c9907710aa152ee1f6f..6c1fd3af6ddcab1495e8d0ae53f2635630f07b50 100644 (file)
@@ -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;