!!ATIfs1.0

StartConstants;

CONSTANT c0 = { 0.299, 0.584, 0.117, 0 };
CONSTANT c1 = { -0.09765625, -0.1953125, 0, 0 };
CONSTANT c2 = {  0.09765625, -0.1953125, 0, 0 };

EndConstants;

StartPrelimPass;

PassTexCoord	r0, t0.str;

ADD	r1.rgb, r0, c1;
ADD	r2.rgb, r0, c2;

EndPass;

StartOutputPass;

SampleMap	r0, r0.str;
SampleMap	r1, r1.str;
SampleMap	r2, r2.str;

DOT3	r0.rgb, r0, c0;
DOT3	r1.rgb, r1, c0;
DOT3	r2.rgb, r2, c0;

ADD		r1.rgb, r0, r1.neg;
ADD		r2.rgb, r0, r2.neg;
CND0	r1.rgb, r1, r1, r1.neg;
CND0	r2.rgb, r2, r2, r2.neg;

ADD		r0.rgb.8x, r1, r2;

EndPass;
