STARK: Fix GLSL 1.20 support

This commit is contained in:
Bastien Bouclet 2015-09-15 08:21:32 +02:00
parent 635bb687d8
commit 1ff3a2888c

View File

@ -100,17 +100,13 @@ void main()
vec3 lightColor = ambientColor;
for (int i = 0; i < maxLights; i++) {
int type = int(lights[i].position.w);
switch (type) {
case lightTypePoint:
if (type == lightTypePoint) {
lightColor += pointLight(lights[i].position.xyz, lights[i].color, lights[i].params.x, lights[i].params.y);
break;
case lightTypeDirectional:
} else if (type == lightTypeDirectional) {
lightColor += directionalLight(lights[i].direction, lights[i].color);
break;
case lightTypeSpot:
} else if (type == lightTypeSpot) {
lightColor += spotLight(lights[i].position.xyz, lights[i].color, lights[i].params.x, lights[i].params.y,
lights[i].direction, lights[i].params.z, lights[i].params.w);
break;
}
}