From af10977bf55263bdd3724ba33677f7b9e28a5881 Mon Sep 17 00:00:00 2001 From: Xiaochun Tong Date: Thu, 21 Nov 2019 13:56:37 -0500 Subject: [PATCH] fix mix --- src/core/bsdfs/mixbsdf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/bsdfs/mixbsdf.cpp b/src/core/bsdfs/mixbsdf.cpp index 4decbcf..0f4e3d2 100644 --- a/src/core/bsdfs/mixbsdf.cpp +++ b/src/core/bsdfs/mixbsdf.cpp @@ -6,7 +6,7 @@ namespace miyuki::core { return mix(bsdfA->evaluate(sp, wo, wi), bsdfB->evaluate(sp, wo, wi), fraction->evaluate(sp)); } Float MixBSDF::evaluatePdf(const ShadingPoint &sp, const Vec3f &wo, const Vec3f &wi) const { - return mix(bsdfA->evaluatePdf(sp, wo, wi), bsdfB->evaluatePdf(sp, wo, wi), fraction->evaluate(sp)[0]); + return mix(bsdfB->evaluatePdf(sp, wo, wi), bsdfA->evaluatePdf(sp, wo, wi), fraction->evaluate(sp)[0]); } void MixBSDF::sample(Point2f u, const ShadingPoint &sp, BSDFSample &sample) const {