#version 120

varying vec3 n;
varying vec3 wn;
varying vec3 wc;

uniform vec3 lightdir=vec3(-1.,-1.,1.);
uniform vec4 lightcolor=vec4(1.,.7,.5,1.);

void main() {
	vec3 normal=normalize(wn);
	float lightdot = length(wc)/8;//abs(dot(normal,lightdir));
	lightdot*=lightdot;
	
	vec3 c = .1*lightdot*(abs(normal)/5+abs(wc)/10);
	
	gl_FragColor = vec4(0.,0.,0.,1.);
	gl_FragColor.xyz = c;
}
