uniform sampler2D noiseMap;

uniform float texW;
uniform float texH;

uniform vec4 trans;
uniform vec4 scale;

varying vec2 tc;
uniform vec2 texLookupScale;

varying vec4 worldpos_vert;

varying vec4 shadow_tex_coord;

varying float vertex_height;

void main() 
{
  //  tc = gl_Vertex.xz;
  tc = gl_Vertex.xz * texLookupScale;

  //vec4 transformed_vertex = gl_Vertex; //(gl_Vertex+trans)*scale;

  //  vertex_height = (gl_Vertex.y+trans.y)*scale.y;
  //  vertex_height = transformed_vertex.y;

  worldpos_vert = gl_Vertex;

  shadow_tex_coord = gl_TextureMatrix[2] * gl_Vertex;

  vertex_height = gl_Vertex.y;

  //  gl_Position = gl_ModelViewProjectionMatrix * transformed_vertex;
  gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
  gl_ClipVertex = gl_ModelViewMatrix * worldpos_vert;

}
