     return task;
 }
 
-void calculate_gauss_coefficients(float sigma) {
-    // Incremental Gaussian Coefficent Calculation (See GPU Gems 3 pp. 877 - 889)
-    vGaussCoefficients = vec2(1.0 / (sqrt(2.0 * 3.14159265) * sigma),
-                              exp(-0.5 / (sigma * sigma)));
-
-    // Pre-calculate the coefficient total in the vertex shader so that
-    // we can avoid having to do it per-fragment and also avoid division
-    // by zero in the degenerate case.
-    vec3 gauss_coefficient = vec3(vGaussCoefficients,
-                                  vGaussCoefficients.y * vGaussCoefficients.y);
-    float gauss_coefficient_total = gauss_coefficient.x;
-    for (int i = 1; i <= vSupport; i += 2) {
-        gauss_coefficient.xy *= gauss_coefficient.yz;
-        float gauss_coefficient_subtotal = gauss_coefficient.x;
-        gauss_coefficient.xy *= gauss_coefficient.yz;
-        gauss_coefficient_subtotal += gauss_coefficient.x;
-        gauss_coefficient_total += 2.0 * gauss_coefficient_subtotal;
-    }
-
-    // Scale initial coefficient by total to avoid passing the total separately
-    // to the fragment shader.
-    vGaussCoefficients.x /= gauss_coefficient_total;
-}
-
 void main(void) {
     BlurTask blur_task = fetch_blur_task(aBlurRenderTaskAddress);
     RenderTaskCommonData src_task = fetch_render_task_common_data(aBlurSourceTaskAddress);


        vec2 offset = vOffsetScale * (float(i) + gauss_ratio);

        vec2 st0 = max(vUv - offset, vUvRect.xy);
        vec2 st1 = min(vUv + offset, vUvRect.zw);
        avg_color += (SAMPLE_TEXTURE(st0) + SAMPLE_TEXTURE(st1)) *
                     gauss_coefficient_subtotal;
    }

    oFragColor = vec4(avg_color);
}
#endif

    // Equation 1 with a single texture lookup.

    for (int i = 1; i <= vSupport; i += 2) {
        float gauss_coefficient_subtotal = gauss_coefficient.x;
        gauss_coefficient.xy *= gauss_coefficient.yz;
        gauss_coefficient_subtotal += gauss_coefficient.x;
