// Copyright 2006-2010 (C) - Frictional Games
//
// This file is part of HPL1 Engine
//
// For conditions of distribution and use, see copyright notice in LICENSE-shaders
//

///////////////////////////////////////////////////////
/// SIMPLE DIFFUSE COLOR VERTEX PROGRAM ////////////
///////////////////////////////////////////////////////

in vec4 vColor;
in vec2 vUv;
in float vFogUv;

OUTPUT

uniform sampler2D tex0; //diffuseMap
uniform sampler1D tex1; //fogMap

void main()
{
	vec4 diffuse = texture(tex0, vUv);
	float alpha = texture1D(tex1, vFogUv).g;
	outColor.xyz = diffuse.xyz * alpha + vec3(0.5,0.5,0.5)*(1 - alpha);
	outColor.w = diffuse.w;
}