RGB BRDFToBTDF::f(const Vector &wo, const Vector &wi) const { return mBrdf->f(wo, otherHemisphere(wi)); }
Spectrum BRDFToBTDF::Sample_f(const Vector &wo, Vector *wi, float u1, float u2, float *pdf) const { Spectrum f = brdf->Sample_f(wo, wi, u1, u2, pdf); *wi = otherHemisphere(*wi); return f; }
RGB BRDFToBTDF::Sample_f(const Vector& wo, Vector* wi, float u1, float u2, float *pdf) const { RGB ret = mBrdf->Sample_f(wo, wi, u1, u2, pdf); *wi = otherHemisphere(*wi); //改变采样后的入射光的方向 return ret; }
// BxDF Method Definitions Spectrum BRDFToBTDF::f(const Vector &wo, const Vector &wi) const { return brdf->f(wo, otherHemisphere(wi)); }