10 uniform sampler2D texture0;
12 vec4 light0_colour = vec4(1.0,1.0,1.0,1.0);
13 float light0_att = 0.0;
17 vec3 n = normalize(normal);
18 vec3 diffuse = vec3(0.0);
21 if (light0_att > 0.0) {
22 float dist = length(light0_to);
23 if (dist > light0_att) {
26 att = 1.0-((1.0/light0_att)*dist);
30 vec3 to = normalize(light0_to);
31 diffuse += max((max(dot(n,to),0.0)*light0_colour.rgb)*att,0.2);
36 vec4 texdata = texture(texture0,uv);
38 final_colour = vec4(diffuse,1.0)*texdata;