////////////////////////////////////////////////////////////////////////
//
//   Harvard Computer Science
//	    CS 175: Introduction to Computer Graphics
//   Professor: Hanspeter Pfister
//         TFs: Moritz Baecher, Yuanchen Zhu, Kalyan Sunkavalli, Kevin Dale
//
//   File: raindrop.frag
//   Name: Felix Gonda (felix.e.gonda@gmail.com)
//   Date: Dec 3rd, 2010
//   Desc: vertex shader for rain drop
//   
//////////////////////////////////////////////////////////////////////////
varying vec2 Texcoord;
varying vec4 vColor;

#define MAX_LIGHTS 5
varying vec3 lightDir[MAX_LIGHTS];

void main( void )
{
    gl_Position = ftransform();
    Texcoord    = gl_MultiTexCoord0.xy;
    vColor = gl_Color;
    
    
    vec3 vertexPos = vec3(gl_ModelViewMatrix * gl_Vertex);
    
    int i;
    for(i=0; i<MAX_LIGHTS; i++)
    {
		lightDir[i] = (gl_LightSource[i].position.xyz - vertexPos);
    }    
}