uniform vec2 lightLocation[10];\r
uniform vec3 lightColor;\r
uniform float amb;\r
-// uniform float lightStrength;\r
-//uniform float screenHeight;\r
+\r
void main(){\r
vec4 color = vec4(0.0f,0.0f,0.0f,0.0f);\r
for(int i = 0; i < numLight; i++){\r
vec2 loc = lightLocation[i];\r
- //if(loc.x == 0.0f) continue;\r
float dist = length(loc - gl_FragCoord.xy);\r
float attenuation=1.0/(1.0+0.01*dist+0.00000000001*dist*dist);\r
\r
- //vec4 color = vec4(1.0f,1.0f,1.0f,1.0f);\r
color += vec4(attenuation, attenuation, attenuation, 1.0f) * vec4(lightColor, 1.0f);\r
- //color = color + vec4((vec3(lightColor.r + amb, lightColor.g + amb, lightColor.b + amb)*0.25f),1.0f);\r
}\r
vec2 coords = gl_TexCoord[0].st;\r
vec4 tex = texture2D(sampler, coords);\r