attribute vec3 position;
uniform mat4 MVP;
uniform mat3 N;
varying float z;
#ifdef ENABLE_GI
attribute vec3 normal;
attribute vec2 texcoord;
varying vec2 FS_texcoord;
varying float nor;
#endif

void main(void)
{
    vec4 pos = MVP*vec4(position, 1.);
    z = (pos.z + 1.) / 2.;
    nor = clamp((N*normal).y, 0., 1.);
#ifdef ENABLE_GI
    FS_texcoord = texcoord;
#endif
    gl_Position = pos;
}

