//A.
float4 GlowA_fp
    (
         float2 uv: TEXCOORD0,

         uniform sampler2D scene: register(s0),
         uniform float4 invTexSize
         //uniform float time
    ) : COLOR
#define RENDER_SCENE 1
#define BLUR_RADIUS 2
{
    float4 colour = float4(0);
    float blurSize = BLUR_RADIUS * invTexSize.x;

    //X-blur.
    colour += tex2D(scene, float2(uv.x - 4.0*blurSize, uv.y)) * 1.0/25.0;
    colour += tex2D(scene, float2(uv.x - 3.0*blurSize, uv.y)) * 2.0/25.0;
    colour += tex2D(scene, float2(uv.x - 2.0*blurSize, uv.y)) * 3.0/25.0;
    colour += tex2D(scene, float2(uv.x - blurSize, uv.y)) * 4.0/25.0;
    colour += tex2D(scene, float2(uv.x, uv.y)) * 5.0/25.0;
    colour += tex2D(scene, float2(uv.x + blurSize, uv.y)) * 4.0/25.0;
    colour += tex2D(scene, float2(uv.x + 2.0*blurSize, uv.y)) * 3.0/25.0;
    colour += tex2D(scene, float2(uv.x + 3.0*blurSize, uv.y)) * 2.0/25.0;
    colour += tex2D(scene, float2(uv.x + 4.0*blurSize, uv.y)) * 1.0/25.0;

    return colour;
}

//B.
float4 GlowB_fp
    (
         float2 uv: TEXCOORD0,

         uniform sampler2D scene: register(s0),
         uniform sampler2D blurX: register(s1),
         uniform float4 invTexSize,
         uniform float time
    ) : COLOR
{
    float4 colour = float4(0);
    float blurSize = BLUR_RADIUS * invTexSize.y;

    //Y-blur.
    colour += tex2D(blurX, float2(uv.x, uv.y - 4.0*blurSize)) * 1.0/25.0;
    colour += tex2D(blurX, float2(uv.x, uv.y - 3.0*blurSize)) * 2.0/25.0;
    colour += tex2D(blurX, float2(uv.x, uv.y - 2.0*blurSize)) * 3.0/25.0;
    colour += tex2D(blurX, float2(uv.x, uv.y - blurSize)) * 4.0/25.0;
    colour += tex2D(blurX, float2(uv.x, uv.y)) * 5.0/25.0;
    colour += tex2D(blurX, float2(uv.x, uv.y + blurSize)) * 4.0/25.0;
    colour += tex2D(blurX, float2(uv.x, uv.y + 2.0*blurSize)) * 3.0/25.0;
    colour += tex2D(blurX, float2(uv.x, uv.y + 3.0*blurSize)) * 2.0/25.0;
    colour += tex2D(blurX, float2(uv.x, uv.y + 4.0*blurSize)) * 1.0/25.0;

    //Add this to original, return.
    return
#if RENDER_SCENE
        tex2D(scene, uv) +
#endif
        colour * (4 + sin(time) * 0.35);
}