#version 110

varying vec3 magic;

uniform float intensity;

const float maxZ=10.0;
const float constant=0.05, k=0.001;

void main(void)
{
//	float useZ=magic.z;

//	vec3 arne = vec3(magic.xy, magic.z);
	
	//float a = min(useZ, maxZ)*0.1; // 0.33*(1.0-exp(-k*useZ))/k; //

	float a = length(magic);

	gl_FragColor.rgb = gl_Color.rgb * (a*intensity);
	gl_FragColor.a=1.0;
}
