// vert //

out vec3 geom_normal;
out vec4 object_color;

void main(void) {
	qgl_FragTexture = qgl_Texture;
	gl_Position = qgl_ftransform();
	
	geom_normal = normalize(qgl_Normal * qgl_getNormalMatrix());
	object_color = qgl_ObjectColor;
}


// frag //

in vec3 geom_normal;
in vec4 object_color;

void main(void) {
	vec3 normal = normalize(geom_normal);
	float l = max(0, dot(normal, vec3(0,0,1)));
	qgl_FragColor = object_color * (l * 0.6 + 0.4);
}
