In the Extended 0.41, how do I apply a shader?

BlitzMax Modules Forums/MiniB3D/In the Extended 0.41, how do I apply a shader?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Hmm, I'm sure that works great, although I guess my shader is dodgy because the sprite seems to be showing a solid colour, although the colour does change from blacks and browns as I move around the map.

Do you see anything wrong with my shader?

bloom.frag
uniform sampler2D bgl_RenderedTexture;

void main()
{
   vec4 sum = vec4(0);
   vec2 texcoord = vec2(gl_TexCoord[0]);
   Int j;
   Int i;

   For( i= -4 ;i < 4; i++)
   {
        For (j = -3; j < 3; j++)
        {
            sum += texture2D(bgl_RenderedTexture, texcoord + vec2(j, i)*0.004) * 0.25;
        }
   }
       If (texture2D(bgl_RenderedTexture, texcoord).r < 0.3)
    {
       gl_FragColor = sum*sum*0.012 + texture2D(bgl_RenderedTexture, texcoord);
    }
    Else
    {
        If (texture2D(bgl_RenderedTexture, texcoord).r < 0.5)
        {
            gl_FragColor = sum*sum*0.009 + texture2D(bgl_RenderedTexture, texcoord);
        }
        Else
        {
            gl_FragColor = sum*sum*0.0075 + texture2D(bgl_RenderedTexture, texcoord);
        }
    }
}