a
Size: a a a
a
U
U
U
a
U
U
U
U
U
a
U
U
U
U
a
U
AF
U
uniform sampler2D tex;
uniform sampler2D depth_tex;
uniform vec4 light_ambient;
uniform int num_lights;
uniform vec3 light_source_points[16];
uniform float light_radiuses[16];
uniform vec2 window_size;
void main(void) {
for(int i = 0; i < num_lights; i++) {
vec2 dist = vec2(abs(gl_TexCoord[0].s - light_source_points[i].x / window_size.x),
abs(gl_TexCoord[0].t - light_source_points[i].y / window_size.y));
if(all(lessThanEqual(light_radiuses[i] / window_size, dist))) {
gl_FragColor = vec4(0.0, 0.0, 1.0, 1.0);
return;
}
}
gl_FragColor = texture2D(tex, gl_TexCoord[0].st) * light_ambient;
}