 #endif
 
 #ifdef MATERIAL_TRANSMISSION
-    vec3 diffuse = mix(f_diffuse, f_transmission, materialInfo.transmissionFactor);
+    vec3 diffuse = mix(f_diffuse, f_transmission, materialInfo.transmissionFactor * (1.0 - materialInfo.metallic));
 #else
     vec3 diffuse = f_diffuse;
 #endif

#ifdef USE_IBL
#ifdef MATERIAL_IRIDESCENCE
    f_specular += getIBLRadianceGGXIridescence(n, v, materialInfo.perceptualRoughness, materialInfo.f0, iridescenceFresnel, materialInfo.iridescenceFactor, materialInfo.specularWeight);
#else
    f_specular += getIBLRadianceGGX(n, v, materialInfo.perceptualRoughness, materialInfo.f0, materialInfo.specularWeight);
#endif
    f_diffuse += getIBLRadianceLambertian(n, v, materialInfo.perceptualRoughness, materialInfo.c_diff, materialInfo.f0, materialInfo.specularWeight);

#ifdef MATERIAL_CLEARCOAT
    f_clearcoat += getIBLRadianceGGX(materialInfo.clearcoatNormal, v, materialInfo.clearcoatRoughness, materialInfo.clearcoatF0, 1.0);

        float viewAngle = sqrt(1.0 + (sq(NdotV) - 1.0) / sq(outsideIOR));

        iridescenceFresnel = evalIridescence(outsideIOR, materialInfo.iridescenceIOR, viewAngle, materialInfo.iridescenceThickness, materialInfo.f0);
        iridescenceFresnelMax = vec3(max(max(iridescenceFresnel.r, iridescenceFresnel.g), iridescenceFresnel.b));
    }
#endif

