implemented getRoughness() for a few more BSDFs
parent
d5b944d6a3
commit
cf5bf411e4
|
@ -218,6 +218,10 @@ public:
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Float getRoughness(const Intersection &its, int component) const {
|
||||||
|
return m_nestedBSDF->getRoughness(its, component);
|
||||||
|
}
|
||||||
|
|
||||||
void addChild(const std::string &name, ConfigurableObject *child) {
|
void addChild(const std::string &name, ConfigurableObject *child) {
|
||||||
if (child->getClass()->derivesFrom(MTS_CLASS(Texture)) && name == "opacity")
|
if (child->getClass()->derivesFrom(MTS_CLASS(Texture)) && name == "opacity")
|
||||||
m_opacity = static_cast<Texture *>(child);
|
m_opacity = static_cast<Texture *>(child);
|
||||||
|
|
|
@ -286,6 +286,12 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Float getRoughness(const Intersection &its, int component) const {
|
||||||
|
int bsdfIndex = m_indices[component].first;
|
||||||
|
component = m_indices[component].second;
|
||||||
|
return m_bsdfs[bsdfIndex]->getRoughness(its, component);
|
||||||
|
}
|
||||||
|
|
||||||
std::string toString() const {
|
std::string toString() const {
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
oss << "MixtureBSDF[" << endl
|
oss << "MixtureBSDF[" << endl
|
||||||
|
@ -418,7 +424,6 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
MTS_DECLARE_CLASS()
|
MTS_DECLARE_CLASS()
|
||||||
private:
|
private:
|
||||||
std::vector<Shader *> m_bsdfShader;
|
std::vector<Shader *> m_bsdfShader;
|
||||||
|
|
Loading…
Reference in New Issue