!!ARBvp1.0 OPTION ARB_position_invariant ;
MOV		result.texcoord[0], vertex.texcoord[0];
MOV		result.color.xyz, vertex.color;

END

#======================================================================

!!ARBfp1.0 
OPTION ARB_precision_hint_nicest;

TEMP		color, R0, R1, pos, displace, half;

PARAM		size=0.017;
PARAM		strength=.24;


MOV		R0, fragment.texcoord[0];
MUL		pos, R0, program.env[0];
ADD		pos.y, program.env[0], -pos.y;

MOV		color.xyz, 0;

MUL		half, program.env[0], 0.5;

SUB		R1, pos, half;

MOV		displace.x, 1;
MAD		R0, R1, displace.x, half;
TEX		R0, R0, texture[0], 2D;
MAD		color.xyz, R0, strength.y, color;

SUB		displace.x, displace.x, size.x;
MAD		R0, R1, displace.x, half;
TEX		R0, R0, texture[0], 2D;
MAD		color.xyz, R0, strength.y, color;

SUB		displace.x, displace.x, size.x;
MAD		R0, R1, displace.x, half;
TEX		R0, R0, texture[0], 2D;
MAD		color.xyz, R0, strength.y, color;

SUB		displace.x, displace.x, size.x;
MAD		R0, R1, displace.x, half;
TEX		R0, R0, texture[0], 2D;
MAD		color.xyz, R0, strength.y, color;

SUB		displace.x, displace.x, size.x;
MAD		R0, R1, displace.x, half;
TEX		R0, R0, texture[0], 2D;
MAD		color.xyz, R0, strength.y, color;

TEX		R0, pos, texture[0], 2D;
ADD		color.xyz, color, R0;

DP3		R1, color, { 0.5,0.4,0.3};
LRP		color.xyz, R1, color, R1;

# load the screen render
MOV		result.color.xyz, color;
END
