     vec3 reflectance90;           // reflectance color at grazing angle
     vec3 specularColor;           // color contribution from specular lighting
 
+    vec3 normal;
     float clearcoatFactor;
-    float clearcoatRoughness;
-    vec3 clearcoatNormal;
 };
 
 //based on Schlicks approximation of Fresnel

    vec3 diffuse = diffuseLight * materialInfo.diffuseColor;
    vec3 specular = specularLight * (materialInfo.specularColor * brdf.x + brdf.y);

    return diffuse + specular;
}

vec3 getIBLClearcoat(MaterialInfo materialInfo, vec3 v, vec3 color)
{
    float NdotVClearcoat = clamp(dot(materialInfo.clearcoatNormal, v), 0.0, 1.0);

    float lod = clamp(materialInfo.clearcoatRoughness * float(u_MipCount), 0.0, float(u_MipCount));
    vec3 reflection = normalize(reflect(-v, materialInfo.clearcoatNormal));

    vec2 brdfSamplePoint = clamp(vec2(NdotVClearcoat, materialInfo.clearcoatRoughness), vec2(0.0, 0.0), vec2(1.0, 1.0));
    // retrieve a scale and bias to F0. See [1], Figure 3
    vec2 brdf = texture(u_brdfLUT, brdfSamplePoint).rg;

    vec4 specularSampleClearcoat = textureLod(u_SpecularEnvSampler, reflection, lod);

#ifdef USE_HDR
    vec3 specularLightClearcoat = specularSampleClearcoat.rgb;
#else
    vec3 specularLightClearcoat = SRGBtoLINEAR(specularSampleClearcoat).rgb;
#endif
    vec3 specularClearcoat = specularLightClearcoat * (vec3(1.0) * brdf.x + brdf.y);

    vec3 N = materialInfo.clearcoatNormal;
    vec3 L = -materialInfo.clearcoatNormal;
    vec3 H = normalize(L + v);
    float NdotL = clamp(dot(N, L), 0.0, 1.0); // l = 1.0
    float VdotH = clamp(dot(H, v), 0.0, 1.0); // h = normal( l + v );
    vec3 factor0 = (1.0 - materialInfo.clearcoatFactor * fresnel(vec3(0.04), NdotVClearcoat)) * (1.0 - materialInfo.clearcoatFactor * fresnel(vec3(0.04), NdotL));
    vec3 factor1 = materialInfo.clearcoatFactor * fresnel(vec3(0.04), VdotH);
    return specularClearcoat * factor1;
}
#endif //USE_IBL


    // Anything less than 2% is physically impossible and is instead considered to be shadowing. Compare to "Real-Time-Rendering" 4th editon on page 325.
    vec3 specularEnvironmentR90 = vec3(clamp(reflectance * 50.0, 0.0, 1.0));

    // LIGHTING

    vec3 color = vec3(0.0, 0.0, 0.0);
    vec3 normal = getNormal();
    vec3 view = normalize(u_Camera - v_Position);

    MaterialInfo materialInfo = MaterialInfo(
        perceptualRoughness,
        specularEnvironmentR0,
