 //direction, dist, NDL, attenuation, compute diffuse, compute specular
 
 vec3 computeSpotLightShading(
-                             const in vec3 normal,
-                             const in vec3 eyeVector,
-
-                             const in vec3 materialAmbient,
-                             const in vec3 materialDiffuse,
-                             const in vec3 materialSpecular,
-                             const in float materialShininess,
-
-                             const in vec3 lightAmbient,
-                             const in vec3 lightDiffuse,
-                             const in vec3 lightSpecular,
-
-                             const in vec3  lightSpotDirection,
-                             const in vec4  lightAttenuation,
-                             const in vec4  lightSpotPosition,
-                             const in float lightCosSpotCutoff,
-                             const in float lightSpotBlend,
-
-                             const in mat4 lightMatrix,
-                             const in mat4 lightInvMatrix,
-
-                             out vec3 eyeLightPos,
-                             out vec3 eyeLightDir,
-                             out float NdotL,
-                             out bool lighted)
-{
+    const in vec3 normal,
+    const in vec3 eyeVector,
+
+    const in vec3 materialAmbient,
+    const in vec3 materialDiffuse,
+    const in vec3 materialSpecular,
+    const in float materialShininess,
+
+    const in vec3 lightAmbient,
+    const in vec3 lightDiffuse,
+    const in vec3 lightSpecular,
+
+    const in vec3  lightSpotDirection,
+    const in vec4  lightAttenuation,
+    const in vec4  lightSpotPosition,
+    const in float lightCosSpotCutoff,
+    const in float lightSpotBlend,
+
+    const in mat4 lightMatrix,
+    const in mat4 lightInvMatrix,
+
+    out vec3 eyeLightPos,
+    out vec3 eyeLightDir,
+    out float NdotL,
+    out bool lighted){
     lighted = false;
     eyeLightPos = vec3(lightMatrix * lightSpotPosition);
     eyeLightDir = eyeLightPos - vViewVertex.xyz;

    specularContrib = specfac*materialSpecular*lightSpecular*att;
}

void lambert(const in float ndl,  const in vec3 materialDiffuse, const in vec3 lightDiffuse, out vec3 diffuseContrib)
{
    diffuseContrib = ndl*materialDiffuse*lightDiffuse;
}
////////////////////////

    // compute dist
    // compute attenuation
    float attenuation = getLightAttenuation(dist, lightAttenuation);
    if (attenuation != 0.0) {
        // compute direction
        eyeLightDir = dist > 0.0 ? eyeLightDir / dist :  vec3( 0.0, 1.0, 0.0 );
        // compute NdL
        NdotL = dot(eyeLightDir, normal);
        if (NdotL > 0.0) {
            lighted = true;
            vec3 diffuseContrib;
            lambert(NdotL, materialDiffuse, lightDiffuse, diffuseContrib);
            vec3 specularContrib;
            specularCookTorrance(normal, eyeLightDir, eyeVector, materialShininess, materialSpecular, lightSpecular, specularContrib);
            return attenuation * (diffuseContrib + specularContrib);
        }
    }
    return vec3(0.0);
}

vec3 computeSunLightShading(

    const in vec3 normal,
    const in vec3 eyeVector,

    const in vec3 materialAmbient,
    const in vec3 materialDiffuse,
    const in vec3 materialSpecular,
    const in float materialShininess,

    const in vec3 lightAmbient,
    const in vec3 lightDiffuse,
    const in vec3 lightSpecular,

    const in vec4 lightPosition,

    const in mat4 lightMatrix,

    out vec3 eyeLightDir,
    out float NdotL,
    out bool lighted) {

    lighted = false;
    eyeLightDir = normalize( vec3(lightMatrix * lightPosition ) );
    // compute NdL   // compute NdL
    NdotL = dot(eyeLightDir, normal);
    if (NdotL > 0.0) {
        lighted = true;
        vec3 diffuseContrib;
        lambert(NdotL, materialDiffuse, lightDiffuse, diffuseContrib);
        vec3 specularContrib;
        specularCookTorrance(normal, eyeLightDir, eyeVector, materialShininess, materialSpecular, lightSpecular, specularContrib);
        return (diffuseContrib + specularContrib);
    }
    return vec3(0.0);
}

vec3 computeHemiLightShading(

    const in vec3 normal,
