varying float depth;
varying float XYlimit;
uniform float pos;
uniform float thres;

void main (void)
{
	vec4 color = gl_Color;
	//color.r = cos(depth);
	//color.g = cos(depth+3.14*2.*0.333);
	//color.b = cos(depth+3.14*2.*0.666);
	if ((depth<=pos+thres/2 && depth > pos -thres/2) && depth > 1)
	{ color.a = 1;}
	else {color.a=0;}
	//color.a *= XYlimit;
	gl_FragColor =  color;
}