fixed an issue in (Rough)Coating::getRoughness (reported by Adrien Grueson)
parent
1aa267a4cc
commit
6b0572bc90
|
@ -380,7 +380,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
Float getRoughness(const Intersection &its, int component) const {
|
Float getRoughness(const Intersection &its, int component) const {
|
||||||
return component < (int) m_components.size()
|
return component < (int) m_components.size()-1
|
||||||
? m_nested->getRoughness(its, component) : (Float) 0;
|
? m_nested->getRoughness(its, component) : (Float) 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -438,7 +438,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
Float getRoughness(const Intersection &its, int component) const {
|
Float getRoughness(const Intersection &its, int component) const {
|
||||||
return component < (int) m_components.size()
|
return component < (int) m_components.size() - 1
|
||||||
? m_nested->getRoughness(its, component)
|
? m_nested->getRoughness(its, component)
|
||||||
: m_alpha->eval(its).average();
|
: m_alpha->eval(its).average();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue