
uniform sampler2D Tex[4];

uniform float4 c[4];

void main(in float4 _vcol : COLOR, in float2 _vt0 : TEXCOORD0, in float2 _vt1 : TEXCOORD1, in float2 _vt2 : TEXCOORD2, in float2 _vt3 : TEXCOORD3, out float4 _ocol : COLOR)
{
	float4 T0 = tex2D(Tex[0], _vt0);
	float4 T1 = tex2D(Tex[1], _vt1);
	float4 T2 = tex2D(Tex[2], _vt2);
	float4 T3 = tex2D(Tex[3], _vt3);
	_ocol = (((_vcol * (1.0 - c[0]) * T0 + c[0] * T0) * (1.0 - c[1]) * T1 + c[1] * T1) * (1.0 - c[2]) * T2 + c[2] * T2) * (1.0 - c[3]) * T3 + c[3] * T3;
}
