attribute vec3 position;
attribute vec3 normal;
attribute vec2 texcoord;

uniform mat4 MVP;
uniform mat3 N;
UNIFORMS

varying lowp float FS_diffuse;
varying lowp vec2 FS_texcoord;
VARYINGS

void main(void)
{
    vec3 nor = N*normal;
    vec4 pos = MVP*vec4(position, 1.);

    SET_SHADOW
    SET_AMBIENT_OCCL

    FS_texcoord = texcoord;
    FS_diffuse = max(dot(LIGHT, nor)*_DIFFUSE, 0.);
    gl_Position = pos;
}

