Skip to content
This repository has been archived by the owner on Mar 19, 2020. It is now read-only.

Commit

Permalink
fix mix
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiaochun Tong committed Nov 21, 2019
1 parent 8c140e2 commit af10977
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/bsdfs/mixbsdf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace miyuki::core {
return mix<Spectrum>(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<Float>(bsdfA->evaluatePdf(sp, wo, wi), bsdfB->evaluatePdf(sp, wo, wi), fraction->evaluate(sp)[0]);
return mix<Float>(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 {
Expand Down

0 comments on commit af10977

Please sign in to comment.