     vec3 specularColor= vec3(0.0);
     vec3 f0 = vec3(0.04);
 
-    //values from the clearcoat extension
-    #ifdef MATERIAL_CLEARCOAT
-    float clearcoatFactor = 0.0;
-    float clearcoatRoughness = 0.0;
-    vec3 clearcoatNormal = vec3(0.0);
-    #endif
-
     vec4 output_color = baseColor;
 
 #ifdef MATERIAL_SPECULARGLOSSINESS

uniform float u_AlphaCutoff;
#endif

//Clearcoat
#ifdef MATERIAL_CLEARCOAT
uniform float u_ClearcoatFactor;
uniform float u_ClearcoatRoughnessFactor;
#endif

uniform vec3 u_Camera;
uniform int u_MipCount;


        diffuseColor,
        specularEnvironmentR90,
        specularColor,
        normal
    );

#ifdef USE_PUNCTUAL
    for (int i = 0; i < LIGHT_COUNT; ++i)
