void BSSRDF::make_reflectance_and_mfp_compatible( Spectrum& reflectance, const Spectrum& mfp) { if (reflectance.size() != mfp.size()) { // Since it does not really make sense to convert a mfp, a per channel distance, // as if it were a color, we instead always convert the reflectance to match the // size of the mfp. if (mfp.is_spectral()) Spectrum::upgrade(reflectance, reflectance); else Spectrum::downgrade(g_std_lighting_conditions, reflectance, reflectance); } }