 
 vec3 computeLighting(vec3 normalVector, vec3 lightDirection, vec3 lightColor, float attenuation)
 {
-    float diffuse = clamp(dot(normalVector, lightDirection), 0.0, 1.0);
-    vec3 diffuseColor = lightColor * _baseColor.rgb * diffuse;
+    float diffuse = max(dot(normalVector, lightDirection), 0.0);
+     vec3 diffuseColor = lightColor * _baseColor.rgb * diffuse * attenuation;
 
     #if defined(SPECULAR)
 
-	// Blinn-Phong shading
-    vec3 vertexToEye = normalize(v_cameraDirection); 
-    vec3 halfDirection = normalize(lightDirection + v_cameraDirection);
-    float specularAngle = max(dot(halfDirection, normalVector), 0.0);
-    vec3 specularColor = vec3(pow(specularAngle, u_specularExponent));
+	// Phong shading
+    //vec3 vertexToEye = normalize(v_cameraDirection);
+    //vec3 specularAngle = normalize(normalVector * diffuse * 2.0 - lightDirection);  
+    //vec3 specularColor = vec3(pow(clamp(dot(specularAngle, vertexToEye), 0.0, 1.0), u_specularExponent)); 
 
-    return (diffuseColor + specularColor) * attenuation;
+    // Blinn-Phong shading
+    vec3 vertexToEye = normalize(v_cameraDirection);
+    vec3 halfVector = normalize(lightDirection + vertexToEye);
+    float specularAngle = clamp(dot(normalVector, halfVector), 0.0, 1.0);
+    vec3 specularColor = vec3(pow(specularAngle, u_specularExponent)) * attenuation;
+
+    return diffuseColor + specularColor;
 
     #else
     
-        return diffuseColor * attenuation;
+    return diffuseColor;
     
     #endif
 }

    {
        // Compute range attenuation
        vec3 ldir = v_vertexToSpotLightDirection[i] * u_spotLightRangeInverse[i];
        float att = clamp(1.0 - dot(ldir, ldir), 0.0, 1.0);
        vec3 vertexToSpotLightDirection = normalize(v_vertexToSpotLightDirection[i]);

        // TODO: 

        float spotCurrentAngleCos = dot(spotLightDirection, -vertexToSpotLightDirection);

		// Apply spot attenuation
        attenuation *= smoothstep(u_spotLightOuterAngleCos[i], u_spotLightInnerAngleCos[i], spotCurrentAngleCos);
        combinedColor += computeLighting(normalVector, vertexToSpotLightDirection, u_spotLightColor[i], attenuation);
    }
    #endif
    
