So if someone needs it, I wrote a simple fragment shader that applies a 9x9 gaussian blur in a single pass. You have to call it this way:
local shaderblur = fe.add_shader( Shader.Fragment, "blur32.txt" )
shaderblur.set_texture_param( "source")
shaderblur.set_param("pixelBlur", 32)
bgpic.shader = shaderblur
This code assumes you created a "bgpic" image which is, in this case, 32x32 pixel, then the parameter to pass (pixelBlur) is used to scale the shader with respect to the texture. For example if the texture is 32x32 and you pass pixelBlur 32 you are sampling each pixel correctly, otherwise you could see artifacts when you sample 2 or more pixels away.
The code applies a 9x9 gaussian blur with a sigma of 3, so it's good for heavy blurs. Consider that using a single pass gaussian blur is not very efficient since you have to do 81 steps, instead using a two pass gaussian blur you apply just 9 steps + 9 steps. I'm also investigating some code that uses bilinear filtering to make blur even faster...
Here is the shader code:
uniform sampler2D source;
uniform float pixelBlur;
void main() {
vec2 sourceCoordinates = gl_TexCoord[0].xy;
vec4 color = vec4(0.0);
color += texture2D(source, sourceCoordinates + vec2 (-4.0/pixelBlur,-4.0/pixelBlur)) *0.00401;
color += texture2D(source, sourceCoordinates + vec2 (-4.0/pixelBlur,-3.0/pixelBlur)) *0.005895;
color += texture2D(source, sourceCoordinates + vec2 (-4.0/pixelBlur,-2.0/pixelBlur)) *0.007763;
color += texture2D(source, sourceCoordinates + vec2 (-4.0/pixelBlur,-1.0/pixelBlur)) *0.009157;
color += texture2D(source, sourceCoordinates + vec2 (-4.0/pixelBlur,0.0/pixelBlur)) *0.009675;
color += texture2D(source, sourceCoordinates + vec2 (-4.0/pixelBlur,1.0/pixelBlur)) *0.009157;
color += texture2D(source, sourceCoordinates + vec2 (-4.0/pixelBlur,2.0/pixelBlur)) *0.007763;
color += texture2D(source, sourceCoordinates + vec2 (-4.0/pixelBlur,3.0/pixelBlur)) *0.005895;
color += texture2D(source, sourceCoordinates + vec2 (-4.0/pixelBlur,4.0/pixelBlur)) *0.00401;
color += texture2D(source, sourceCoordinates + vec2 (-3.0/pixelBlur,-4.0/pixelBlur)) *0.005895;
color += texture2D(source, sourceCoordinates + vec2 (-3.0/pixelBlur,-3.0/pixelBlur)) *0.008667;
color += texture2D(source, sourceCoordinates + vec2 (-3.0/pixelBlur,-2.0/pixelBlur)) *0.011412;
color += texture2D(source, sourceCoordinates + vec2 (-3.0/pixelBlur,-1.0/pixelBlur)) *0.013461;
color += texture2D(source, sourceCoordinates + vec2 (-3.0/pixelBlur,0.0/pixelBlur)) *0.014223;
color += texture2D(source, sourceCoordinates + vec2 (-3.0/pixelBlur,1.0/pixelBlur)) *0.013461;
color += texture2D(source, sourceCoordinates + vec2 (-3.0/pixelBlur,2.0/pixelBlur)) *0.011412;
color += texture2D(source, sourceCoordinates + vec2 (-3.0/pixelBlur,3.0/pixelBlur)) *0.008667;
color += texture2D(source, sourceCoordinates + vec2 (-3.0/pixelBlur,4.0/pixelBlur)) *0.005895;
color += texture2D(source, sourceCoordinates + vec2 (-2.0/pixelBlur,-4.0/pixelBlur)) *0.007763;
color += texture2D(source, sourceCoordinates + vec2 (-2.0/pixelBlur,-3.0/pixelBlur)) *0.011412;
color += texture2D(source, sourceCoordinates + vec2 (-2.0/pixelBlur,-2.0/pixelBlur)) *0.015028;
color += texture2D(source, sourceCoordinates + vec2 (-2.0/pixelBlur,-1.0/pixelBlur)) *0.017726;
color += texture2D(source, sourceCoordinates + vec2 (-2.0/pixelBlur,0.0/pixelBlur)) *0.018729;
color += texture2D(source, sourceCoordinates + vec2 (-2.0/pixelBlur,1.0/pixelBlur)) *0.017726;
color += texture2D(source, sourceCoordinates + vec2 (-2.0/pixelBlur,2.0/pixelBlur)) *0.015028;
color += texture2D(source, sourceCoordinates + vec2 (-2.0/pixelBlur,3.0/pixelBlur)) *0.011412;
color += texture2D(source, sourceCoordinates + vec2 (-2.0/pixelBlur,4.0/pixelBlur)) *0.007763;
color += texture2D(source, sourceCoordinates + vec2 (-1.0/pixelBlur,-4.0/pixelBlur)) *0.009157;
color += texture2D(source, sourceCoordinates + vec2 (-1.0/pixelBlur,-3.0/pixelBlur)) *0.013461;
color += texture2D(source, sourceCoordinates + vec2 (-1.0/pixelBlur,-2.0/pixelBlur)) *0.017726;
color += texture2D(source, sourceCoordinates + vec2 (-1.0/pixelBlur,-1.0/pixelBlur)) *0.020909;
color += texture2D(source, sourceCoordinates + vec2 (-1.0/pixelBlur,0.0/pixelBlur)) *0.022092;
color += texture2D(source, sourceCoordinates + vec2 (-1.0/pixelBlur,1.0/pixelBlur)) *0.020909;
color += texture2D(source, sourceCoordinates + vec2 (-1.0/pixelBlur,2.0/pixelBlur)) *0.017726;
color += texture2D(source, sourceCoordinates + vec2 (-1.0/pixelBlur,3.0/pixelBlur)) *0.013461;
color += texture2D(source, sourceCoordinates + vec2 (-1.0/pixelBlur,4.0/pixelBlur)) *0.009157;
color += texture2D(source, sourceCoordinates + vec2 (0.0/pixelBlur,-4.0/pixelBlur)) *0.009675;
color += texture2D(source, sourceCoordinates + vec2 (0.0/pixelBlur,-3.0/pixelBlur)) *0.014223;
color += texture2D(source, sourceCoordinates + vec2 (0.0/pixelBlur,-2.0/pixelBlur)) *0.018729;
color += texture2D(source, sourceCoordinates + vec2 (0.0/pixelBlur,-1.0/pixelBlur)) *0.022092;
color += texture2D(source, sourceCoordinates + vec2 (0.0/pixelBlur,0.0/pixelBlur)) *0.023342;
color += texture2D(source, sourceCoordinates + vec2 (0.0/pixelBlur,1.0/pixelBlur)) *0.022092;
color += texture2D(source, sourceCoordinates + vec2 (0.0/pixelBlur,2.0/pixelBlur)) *0.018729;
color += texture2D(source, sourceCoordinates + vec2 (0.0/pixelBlur,3.0/pixelBlur)) *0.014223;
color += texture2D(source, sourceCoordinates + vec2 (0.0/pixelBlur,4.0/pixelBlur)) *0.009675;
color += texture2D(source, sourceCoordinates + vec2 (1.0/pixelBlur,-4.0/pixelBlur)) *0.009157;
color += texture2D(source, sourceCoordinates + vec2 (1.0/pixelBlur,-3.0/pixelBlur)) *0.013461;
color += texture2D(source, sourceCoordinates + vec2 (1.0/pixelBlur,-2.0/pixelBlur)) *0.017726;
color += texture2D(source, sourceCoordinates + vec2 (1.0/pixelBlur,-1.0/pixelBlur)) *0.020909;
color += texture2D(source, sourceCoordinates + vec2 (1.0/pixelBlur,0.0/pixelBlur)) *0.022092;
color += texture2D(source, sourceCoordinates + vec2 (1.0/pixelBlur,1.0/pixelBlur)) *0.020909;
color += texture2D(source, sourceCoordinates + vec2 (1.0/pixelBlur,2.0/pixelBlur)) *0.017726;
color += texture2D(source, sourceCoordinates + vec2 (1.0/pixelBlur,3.0/pixelBlur)) *0.013461;
color += texture2D(source, sourceCoordinates + vec2 (1.0/pixelBlur,4.0/pixelBlur)) *0.009157;
color += texture2D(source, sourceCoordinates + vec2 (2.0/pixelBlur,-4.0/pixelBlur)) *0.007763;
color += texture2D(source, sourceCoordinates + vec2 (2.0/pixelBlur,-3.0/pixelBlur)) *0.011412;
color += texture2D(source, sourceCoordinates + vec2 (2.0/pixelBlur,-2.0/pixelBlur)) *0.015028;
color += texture2D(source, sourceCoordinates + vec2 (2.0/pixelBlur,-1.0/pixelBlur)) *0.017726;
color += texture2D(source, sourceCoordinates + vec2 (2.0/pixelBlur,0.0/pixelBlur)) *0.018729;
color += texture2D(source, sourceCoordinates + vec2 (2.0/pixelBlur,1.0/pixelBlur)) *0.017726;
color += texture2D(source, sourceCoordinates + vec2 (2.0/pixelBlur,2.0/pixelBlur)) *0.015028;
color += texture2D(source, sourceCoordinates + vec2 (2.0/pixelBlur,3.0/pixelBlur)) *0.011412;
color += texture2D(source, sourceCoordinates + vec2 (2.0/pixelBlur,4.0/pixelBlur)) *0.007763;
color += texture2D(source, sourceCoordinates + vec2 (3.0/pixelBlur,-4.0/pixelBlur)) *0.005895;
color += texture2D(source, sourceCoordinates + vec2 (3.0/pixelBlur,-3.0/pixelBlur)) *0.008667;
color += texture2D(source, sourceCoordinates + vec2 (3.0/pixelBlur,-2.0/pixelBlur)) *0.011412;
color += texture2D(source, sourceCoordinates + vec2 (3.0/pixelBlur,-1.0/pixelBlur)) *0.013461;
color += texture2D(source, sourceCoordinates + vec2 (3.0/pixelBlur,0.0/pixelBlur)) *0.014223;
color += texture2D(source, sourceCoordinates + vec2 (3.0/pixelBlur,1.0/pixelBlur)) *0.013461;
color += texture2D(source, sourceCoordinates + vec2 (3.0/pixelBlur,2.0/pixelBlur)) *0.011412;
color += texture2D(source, sourceCoordinates + vec2 (3.0/pixelBlur,3.0/pixelBlur)) *0.008667;
color += texture2D(source, sourceCoordinates + vec2 (3.0/pixelBlur,4.0/pixelBlur)) *0.005895;
color += texture2D(source, sourceCoordinates + vec2 (4.0/pixelBlur,-4.0/pixelBlur)) *0.00401;
color += texture2D(source, sourceCoordinates + vec2 (4.0/pixelBlur,-3.0/pixelBlur)) *0.005895;
color += texture2D(source, sourceCoordinates + vec2 (4.0/pixelBlur,-2.0/pixelBlur)) *0.007763;
color += texture2D(source, sourceCoordinates + vec2 (4.0/pixelBlur,-1.0/pixelBlur)) *0.009157;
color += texture2D(source, sourceCoordinates + vec2 (4.0/pixelBlur,0.0/pixelBlur)) *0.009675;
color += texture2D(source, sourceCoordinates + vec2 (4.0/pixelBlur,1.0/pixelBlur)) *0.009157;
color += texture2D(source, sourceCoordinates + vec2 (4.0/pixelBlur,2.0/pixelBlur)) *0.007763;
color += texture2D(source, sourceCoordinates + vec2 (4.0/pixelBlur,3.0/pixelBlur)) *0.005895;
color += texture2D(source, sourceCoordinates + vec2 (4.0/pixelBlur,4.0/pixelBlur)) *0.00401;
gl_FragColor = color;
}