// Copyright (C) Kimmo Lahtinen - All Rights Reserved

// Input from vertex shader
varying mediump vec2 pixel_uv;
varying mediump float pixel_alpha;

uniform sampler2D diffuse_texture;

void main(void) 
{
	// Note:: should have LIGHTMAP_COLOR_WRITE_FACTOR but it's been compensated on input so ignore
	gl_FragColor = texture2D(diffuse_texture, pixel_uv);
	gl_FragColor.r *= pixel_alpha; // One channel target
	
	// One channel source and one channel target
//	gl_FragColor.r = texture2D(diffuse_texture, pixel_uv).r;
//	gl_FragColor.r *= pixel_alpha;
}
