                         lambert(NdotL, materialDiffuse.rgb, lightDiffuse.rgb, diffuseContrib);
                         vec3 specularContrib;
                         specularCookTorrance(normal, lightDirection, eyeVector, materialShininess, materialSpecular.rgb, lightSpecular.rgb, specularContrib.rgb);
-                        return vec4(lightAmbient.rgb*materialAmbient.rgb + attenuation*spot*diffuseContrib.rgb*specularContrib.rgb*shadowContrib, 1.0);
+                        return vec4(lightAmbient.rgb*materialAmbient.rgb + spot*attenuation*shadowContrib*(diffuseContrib.rgb+specularContrib.rgb), 1.0);
                     }
                 }
             }
         }
     }
-    return vec4(0.0);
+    return vec4(lightAmbient.rgb*materialAmbient.rgb, 1.0);
 }
 
 

                              )
{
  // compute dist
  vec3 lightVector = lightPosition.xyz - eyeVector;
  float dist = length(lightVector);
  // compute attenuation
  float attenuation = getLightAttenuation(dist, lightAttenuation.x, lightAttenuation.y, lightAttenuation.z);
  if (attenuation <= 0.0)
    {
      // compute direction
      vec3 lightDirection = dist > 0.0 ? lightVector / dist :  vec3( 0.0, 1.0, 0.0 );

{
    lv = -lampvec;
}
////////////////////////
/// Main func
///////////////////////
