bugfix to the composite material

metadata
Wenzel Jakob 2010-09-03 00:18:43 +02:00
parent 0f1158c678
commit eedf35f4eb
1 changed files with 4 additions and 4 deletions

View File

@ -221,7 +221,7 @@ public:
Spectrum result = m_bsdfs[entry]->sample(bRec, pdf);
bRec.sampledComponent += m_bsdfOffset[entry];
pdf *= componentPDF;
return result;
return result * m_bsdfWeight[entry];
} else {
/* Pick out an individual component */
for (int i=0; i<m_bsdfCount; ++i) {
@ -234,7 +234,7 @@ public:
Spectrum result = m_bsdfs[i]->sample(bRec, pdf);
bRec.component = bRec.sampledComponent = tempComponent;
return result;
return result * m_bsdfWeight[i];
}
}
Log(EError, "Internal error!");
@ -248,7 +248,7 @@ public:
Spectrum result = m_bsdfs[entry]->sample(bRec);
result /= componentPDF;
bRec.sampledComponent += m_bsdfOffset[entry];
return result;
return result * m_bsdfWeight[entry];
} else {
/* Pick out an individual component */
for (int i=0; i<m_bsdfCount; ++i) {
@ -261,7 +261,7 @@ public:
Spectrum result = m_bsdfs[i]->sample(bRec);
bRec.component = bRec.sampledComponent = tempComponent;
return result;
return result * m_bsdfWeight[i];
}
}
Log(EError, "Internal error!");