!!ARBvp1.0 OPTION ARB_position_invariant;

MOV result.texcoord[0], vertex.texcoord[0];

END

!!ARBfp1.0 OPTION ARB_precision_hint_nicest;

# gaussian distribution in 1D, standard deviation of 3
PARAM x0 = 0.132981;
PARAM x1 = 0.125794;
PARAM x2 = 0.106483;
PARAM x3 = 0.080657;
PARAM x4 = 0.054670;
PARAM x5 = 0.033159;
PARAM x6 = 0.017997;
PARAM x7 = 0.008741;
PARAM x8 = 0.003799;

# pixel locations, assuming texture height of 128
PARAM c0 = {0, 0, 0, 0};
PARAM c1 = {0, 0.0078125, 0, 0};
PARAM c2 = {0, 0.015625, 0, 0};
PARAM c3 = {0, 0.0234375, 0, 0};
PARAM c4 = {0, 0.03125, 0, 0};
PARAM c5 = {0, 0.0390625, 0, 0};
PARAM c6 = {0, 0.046875, 0, 0};
PARAM c7 = {0, 0.0546875, 0, 0};
PARAM c8 = {0, 0.0625, 0, 0};

TEMP color0, color1, color2, color3, color4, color5, color6, color7, color8, final;

MOV color0, fragment.texcoord[0];
ADD color1, color0, c1;
ADD color2, color0, c2;
ADD color3, color0, c3;
ADD color4, color0, c4;
ADD color5, color0, c5;
ADD color6, color0, c6;
ADD color7, color0, c7;
ADD color8, color0, c8;

TEX color1, color1, texture[0], 2D;
TEX color2, color2, texture[0], 2D;
TEX color3, color3, texture[0], 2D;
TEX color4, color4, texture[0], 2D;
TEX color5, color5, texture[0], 2D;
TEX color6, color6, texture[0], 2D;
TEX color7, color7, texture[0], 2D;
TEX color8, color8, texture[0], 2D;

MUL final, color1, x1;
MAD final, color2, x2, final;
MAD final, color3, x3, final;
MAD final, color4, x4, final;
MAD final, color5, x5, final;
MAD final, color6, x6, final;
MAD final, color7, x7, final;
MAD final, color8, x8, final;

SUB color1, color0, c1;
SUB color2, color0, c2;
SUB color3, color0, c3;
SUB color4, color0, c4;
SUB color5, color0, c5;
SUB color6, color0, c6;
SUB color7, color0, c7;
SUB color8, color0, c8;

TEX color0, color0, texture[0], 2D;
TEX color1, color1, texture[0], 2D;
TEX color2, color2, texture[0], 2D;
TEX color3, color3, texture[0], 2D;
TEX color4, color4, texture[0], 2D;
TEX color5, color5, texture[0], 2D;
TEX color6, color6, texture[0], 2D;
TEX color7, color7, texture[0], 2D;
TEX color8, color8, texture[0], 2D;

MAD final, color0, x0, final;
MAD final, color1, x1, final;
MAD final, color2, x2, final;
MAD final, color3, x3, final;
MAD final, color4, x4, final;
MAD final, color5, x5, final;
MAD final, color6, x6, final;
MAD final, color7, x7, final;
MAD final, color8, x8, final;

MOV result.color.xyz, final;

END
