uniform mat4 mvpMatrix;
uniform mat4 normalMatrix;
uniform vec4 lightVec;
attribute vec2 position;
attribute vec2 uv;
varying vec4 color;
varying vec2 texCoord;
void main() {
vec3 n = (normalMatrix * vec4(0.0, 0.0, 1.0, 0.0)).xyz;
float light = clamp(dot(n, lightVec.xyz), 0.0, 1.0) * 0.8 + 0.2;
color = vec4(light, light, light, 1.0);
texCoord = uv;
gl_Position = mvpMatrix * vec4(position, 1.0, 1.0);
}