//
//  Shader.vsh
//  PlayMate
//
//  Created by David McKibbin on 5/21/12.
//  Copyright (c) 2012 Firaxis Games. All rights reserved.
//

attribute vec4 a_Position;
attribute vec3 a_Normal;
attribute vec4 a_Color;
attribute vec2 a_TexUV0;
attribute vec2 a_TexUV1;

uniform mat4 RenderMatrix;

varying lowp vec4 v_Color;
varying lowp vec2 v_TexUV;

void main()
{
    gl_Position = RenderMatrix * a_Position;
	
	v_TexUV = a_TexUV0;
	
	v_Color = a_Color;	// default & preserve alpha
	
	v_Color.rgb = v_Color.a * v_Color.rgb;	// pre-mul alpha
}
