varying vec2 texCoord;
uniform vec4 color;

uniform int abc;

uniform vec3 CameraRight;
uniform vec3 CameraUp;
uniform vec3 particleCenter;
uniform vec3 BillboardSize;

float rand(vec2 co){
    return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);
}

void main(void)
{
vec3 vertexPosition;
	texCoord = gl_MultiTexCoord0.xy;
    vertexPosition =
    particleCenter
    + CameraRight * gl_Vertex.x * BillboardSize.x
    + CameraUp * gl_Vertex.y * BillboardSize.y/2.0f; //this /2.0f is a bug patch
    gl_Position = gl_ModelViewProjectionMatrix * vec4(vertexPosition.x,vertexPosition.y,vertexPosition.z,1.0f);
}
