#if defined( RE_IndirectDiffuse ) #ifdef USE_LIGHTMAP vec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity; #ifndef PHYSICALLY_CORRECT_LIGHTS lightMapIrradiance *= PI; // factor of PI should not be present; included here to prevent breakage #endif irradiance += lightMapIrradiance; #endif #if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV ) // TODO, replace 8 with the real maxMIPLevel irradiance += getLightProbeIndirectIrradiance( /*lightProbe,*/ geometry, 8 ); #endif #endif #if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) radiance += getLightProbeIndirectRadiance( /*specularLightProbe,*/ geometry, Material_BlinnShininessExponent( material ), maxMipLevel ); #ifndef STANDARD clearCoatRadiance += getLightProbeIndirectRadiance( /*specularLightProbe,*/ geometry, Material_ClearCoat_BlinnShininessExponent( material ), maxMipLeven ); #endif #endif