   float blinnExponent = GGXRoughnessToBlinnExponent(material.specularRoughness);
   vec3 irradiance = getLightProbeIndirectIrradiance(geometry.normal, blinnExponent, 8);
   // irradiance = getLightProbeIndirectIrradianceSH(geometry.normal);
-  RE_IndirectDiffuse(irradiance, geometry, material, reflectedLight);
-  
   vec3 radiance = getLightProbeIndirectRadiance(geometry.viewDir, geometry.normal, blinnExponent, 8);
-  RE_IndirectSpecular(radiance, geometry, material, reflectedLight);
-  
+  RE_Indirect(irradiance, radiance, geometry, material, reflectedLight);
+
   vec3 outgoingLight = emissive + reflectedLight.directDiffuse + reflectedLight.directSpecular + reflectedLight.indirectDiffuse + reflectedLight.indirectSpecular;
 
   // outgoingLight = vec3(clearCoat);

  return GammaToLinear(textureCubeLodEXT(radianceMap, queryVec, specMipLevel), float(GAMMA_FACTOR)).rgb;
}

void RE_IndirectDiffuse(const in vec3 irradiance, const in GeometricContext geometry, const in Material material, inout ReflectedLight reflectedLight) {
  reflectedLight.indirectDiffuse += irradiance * DiffuseBRDF(material.diffuseColor) * indirectDiffuseIntensity;
}

void RE_IndirectSpecular(const in vec3 radiance, const in GeometricContext geometry, const in Material material, inout ReflectedLight reflectedLight) {
  float dotNV = saturate(dot(geometry.normal, geometry.viewDir));
  reflectedLight.indirectSpecular += radiance * EnvBRDFApprox(material.specularColor, material.specularRoughness, dotNV) * indirectSpecularIntensity;
}

//-------------------------------------------------------------------------

  material.specularRoughness = max(material.specularRoughness, material.clearCoatRoughness);
  material.linearRoughness = material.specularRoughness * material.specularRoughness;
  
  material.specularColor = mix(material.specularColor,
    f0ClearCoatToSurface(material.specularColor), clearCoat);

