 in vec2 t_tile;
 in vec4 te_normal;
 
+const vec2 eye = vec2(500,500);
+
 layout(location = 0) out vec4 out_Color;
 layout(location = 1) out vec4 out_Normal;
 


uniform sampler2D sBaseTex;

void main(void)
{
	float q = mod(texCoord.x * 1024, 128);
	float r = mod(texCoord.y * 1024, 128);
	
 	float nearD = min(q,r);
// 	float nearD = mod(tile.x, 256);
// 	float edgeIntensity = exp2(-1.0*nearD*nearD);
	
	float edgeIntensity = 1.0 - exp2(-1.0*nearD*nearD);
	float edgeIntensity2 = exp2(-1.0*nearD*nearD);
	
	
	//out_Color = vec4(t_tile.x, t_tile.y,1 ,1.0);
	

 	
	//float distToCursor = length(gl_TessCoord.xy - cursorPos);
	vec4 cursorIntensity = (incx && incy ) ? vec4(0,0,0, 1.0) : vec4(1,1,1,1) ;//0 cursorRad - exp2(-1.0*distToCursor*distToCursor);
	
	out_Normal = vec4(te_normal.xyz, 1);
	out_Color = tc * cursorIntensity * vec4(min(min(ei1, ei2), min(ei3, ei4)), 0,0,1).rrra; //(1.0, 0, .5, .6);
}