void main_vp(	float4 position		: POSITION,
				float3 normal		: NORMAL,
			 	float2 uv			: TEXCOORD0,				
			 	 
			 	// outputs
			 	out float4 oPosition 	: POSITION,
			 	out float2 oUv			: TEXCOORD0,
				out float2 oAddUv		: TEXCOORD1,				
				
			 	// parameters				
				uniform float4x4 worldViewProj,				
				uniform float    timer,
				uniform float2   fAddSpeeds)
{
	
	// calculate output position
	oPosition = mul(worldViewProj, position);		

	// pass the main uvs straight through unchanged
	oUv = uv;			
	
	// moving UVs for Add texture
	oAddUv = uv + timer*fAddSpeeds;		
}


void main_fp( float2 uv			: TEXCOORD0,			  			  
			  float2 uvAdd		: TEXCOORD1,			  			  			  

			  out float4 colour	: COLOR,
			  			  			  
			  uniform float  fBlend,
			  uniform float4 fColor,
			  uniform sampler2D texMap : register(s0),			  
			  uniform sampler2D addMap : register(s1))
{	
	float4 diffTex	= tex2D(texMap,uv);	
	float4 addTex   = tex2D(addMap,uvAdd);
		
	// final
	colour = fColor*diffTex + addTex;			
	
	// alpha
	colour.a = diffTex.a * fBlend;	
}
