varying vec4 ViewPos;
varying vec3 up;
varying vec4 projPos;

const float scale = 2.0;

void main()
{ 
  // particle expansion
  vec4 vertex = gl_Vertex;
  vertex.y += scale * (gl_TexCoord[0].t - gl_TexCoord[0].s);
  vertex.xyz += scale * ( gl_TexCoord[0].s + gl_TexCoord[0].t - 1.0 ) * gl_MultiTexCoord3.xyz; // cam right
  
  // position
  ViewPos = gl_ModelViewMatrix * vertex;
  projPos = gl_ModelViewProjectionMatrix * vertex;

  // set texture coords
  gl_TexCoord[0] = gl_MultiTexCoord0; // Color Map and normal map share coords
 
  // transform position
  gl_Position = projPos;
}