1 uniform vec3 light_dir[8];
2 uniform int light_count;
4 #pragma MSP stage(vertex)
5 layout(location=0) in vec4 position;
6 layout(location=1) in vec3 normal;
9 out float light_intensity = 0.0;
12 for(int i=light_count; i--; )
13 light_intensity += dot(normal, light_dir[i]);
15 gl_Position = position;
18 #pragma MSP stage(fragment)
19 layout(location=0) out vec4 frag_color;
22 frag_color = vec4(vec3(light_intensity), 1.0);
26 <test>:10: Condition is not a boolean
27 <test>:12: Loop condition is not a boolean