From a24c074c0da43eb6536d9596f32e28c3fefa9feb Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Mon, 29 Sep 2014 14:10:40 +0200 Subject: [PATCH] getDiffuseReflectance() implementation for twosided.cpp --- src/bsdfs/twosided.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/bsdfs/twosided.cpp b/src/bsdfs/twosided.cpp index 651aaab6..b5be2408 100644 --- a/src/bsdfs/twosided.cpp +++ b/src/bsdfs/twosided.cpp @@ -195,6 +195,13 @@ public: } } + Spectrum getDiffuseReflectance(const Intersection &its) const { + if (its.wi.z > 0) + return m_nestedBRDF[0]->getDiffuseReflectance(its); + else + return m_nestedBRDF[1]->getDiffuseReflectance(its); + } + Float getRoughness(const Intersection &its, int component) const { if (component < m_nestedBRDF[0]->getComponentCount()) { return m_nestedBRDF[0]->getRoughness(its, component);