uniform sampler2D tex_arrow;

void main (void) 
{
  mat2x2 rotMat = mat2x2(gl_TexCoord[1].xy, gl_TexCoord[1].zw);
  vec2 h = vec2(0.5, 0.5);
  vec2 newCoords = (rotMat * (gl_TexCoord[0].xy - h)) + h;
  gl_FragColor = texture2D(tex_arrow, newCoords);
  gl_FragColor.xyz = gl_Color.xyz;
  gl_FragColor.a = gl_FragColor.a * gl_Color.a;
}
