diff --git a/src/Magnum/Shaders/Phong.frag b/src/Magnum/Shaders/Phong.frag index e9c6afc89..a7a37debb 100644 --- a/src/Magnum/Shaders/Phong.frag +++ b/src/Magnum/Shaders/Phong.frag @@ -155,7 +155,7 @@ void main() { for(int i = 0; i < LIGHT_COUNT; ++i) { highp vec3 normalizedLightDirection = normalize(lightDirections[i]); lowp float intensity = max(0.0, dot(normalizedTransformedNormal, normalizedLightDirection)); - color += vec4(finalDiffuseColor.rgb*lightColors[i].rgb*intensity, lightColors[i].a*finalDiffuseColor.a); + color += vec4(finalDiffuseColor.rgb*lightColors[i].rgb*intensity, lightColors[i].a*finalDiffuseColor.a/float(LIGHT_COUNT)); /* Add specular color, if needed */ if(intensity > 0.001) {