 uniform float u_AlphaCutoff;
 #endif
 
+//Clearcoat
+uniform float u_ClearcoatFactor;
+uniform float u_ClearcoatRoughnessFactor;
+
 uniform vec3 u_Camera;
 
 uniform int u_MipCount;

        // Calculation of analytical lighting contribution
        vec3 diffuseContrib = (1.0 - F) * diffuse(materialInfo);
        vec3 specContrib = F * Vis * D;

        // Obtain final intensity as reflectance (BRDF) scaled by the energy of the light (cosine law)
        return angularInfo.NdotL * (diffuseContrib + specContrib);

    vec3 specularColor;           // color contribution from specular lighting
};

//based on Schlicks approximation of Fresnel
vec3 fresnel(vec3 f0, float NdotL)
{
    return f0 + (1.0 - f0) * pow(clamp(1.0 - (NdotL), 0.0, 1.0), 5.0);
}
// Calculation of the lighting contribution from an optional Image Based Light source.
// Precomputed Environment Maps are required uniform inputs and are computed as outlined in [1].
// See our README.md on Environment Maps [3] for additional discussion.
