uniform vec3 TextFade;
uniform int  FadeGroup;

varying float fade;

void main()
{
  // Handle texture fading
  if (FadeGroup == 0)
    fade = TextFade.x;
  else if (FadeGroup == 1)
    fade = TextFade.y;
  else if (FadeGroup == 2)
    fade = TextFade.z;

  // update position
	gl_Position = ftransform();

  // texture coords
	gl_TexCoord[0] = gl_MultiTexCoord0;
}
