//
//  Sprite2d.fsh  --  basic Sprit2d shader w/DeltaUV (w/o lighting)
//  PlayMate
//
//  Created by David McKibbin on 7/5/12.
//  Copyright (c) 2012 Firaxis Games. All rights reserved.
//

#ifdef GL_ES
precision mediump int;		// built-in defaults
precision highp   float;
precision lowp    sampler2D;
precision lowp    samplerCube;
#endif

// Inputs
varying   vec4	v_Color;
varying   vec2	v_TexUV;

// Constants
uniform  sampler2D	BaseMap;
uniform  float		AlphaTest;

void main()
{
	vec4 texel = texture2D( BaseMap, v_TexUV );

	vec4 pixel = texel * v_Color;	// blend incoming

	gl_FragColor = pixel;

//	if (gl_FragColor.a < AlphaTest)  discard;	// Alpha test
}
