uniform sampler2D texture0;

varying vec2 worldPos;

uniform vec3 cursorInfo; //x and y are position, z is opacity.

void main()
{
	vec4 glowColour = texture2D(texture0, gl_TexCoord[0].xy);

	float distance = length(worldPos - cursorInfo.xy);
	float closeness = 1.0 / (pow(distance, 1.3) + 1.0);
		
	glowColour.xyz *= closeness * 5.0 * cursorInfo.z;
	

	gl_FragColor = glowColour;
}