uniform vec2 screen_size;
uniform vec2 light_pos;
uniform vec2 view_pos;
uniform float layer_scale;
uniform float shadow_limit;
uniform sampler2D u_texture;

varying vec2 v_texCoord;
varying vec4 v_fragmentColor;

void main(){

	//Get current color of pixel/fragment
	vec4 color = texture2D(u_texture, v_texCoord);
	gl_FragColor = color*0.40;
	return;
	
	if(color.a > 0){

		//Position of this fragment in pixels
		vec2 pixel_pos = v_texCoord.xy * screen_size;
		 
		float dist_to_light_in_pixels = distance(pixel_pos,light_pos);
		
		float limit = shadow_limit * layer_scale;
	
		float ratio = dist_to_light_in_pixels / limit;
		if(ratio > 1.0) ratio = 1.0;
		
		ratio = 1.0 - ratio;
		
		color = vec4(0,0,0,ratio);
	 }
	 

	gl_FragColor = color * 0.45;
	
}