//
//  ant shader for rendering global ground
//

#version 120

uniform mat4 in_Projection;
uniform mat4 in_View;
uniform mat4 in_Model;

attribute vec3 attr_Vertex;
attribute vec2 attr_TexCoords;
attribute vec3 attr_Normal;

varying   vec2 TexCoords;
varying   vec3 Normal;

void main() {
    TexCoords = attr_TexCoords;

    Normal = attr_Normal;
    // TODO
    //mat3 NormalMatrix = transpose(inverse(mat3(in_View * in_Model)));
    //Normal = normalize(NormalMatrix * attr_Normal);

    gl_Position = in_Projection * in_View * in_Model * vec4(attr_Vertex, 1.0);
}
