uniform float LengthAmount;
uniform vec3 UpVector;
uniform vec3 RightVector;

void main()
{
  // set texture coords
  gl_TexCoord[0] = gl_MultiTexCoord0; // Color Map and normal map share coords

  // project as billboard
  vec4 vertex = vec4( 0.0, 0.0, 0.0, 1.0 );
  vertex.xyz += gl_Vertex.x * RightVector * LengthAmount;
  vertex.xyz += gl_Vertex.y * UpVector * LengthAmount;
  
  // transform position
  gl_Position = gl_ModelViewProjectionMatrix * vertex;
}