getDiffuseReflectance() implementation for twosided.cpp

metadata
Wenzel Jakob 2014-09-29 14:10:40 +02:00
parent f2e8e796dd
commit a24c074c0d
1 changed files with 7 additions and 0 deletions

View File

@ -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 { Float getRoughness(const Intersection &its, int component) const {
if (component < m_nestedBRDF[0]->getComponentCount()) { if (component < m_nestedBRDF[0]->getComponentCount()) {
return m_nestedBRDF[0]->getRoughness(its, component); return m_nestedBRDF[0]->getRoughness(its, component);