getting there..

metadata
Wenzel Jakob 2011-08-06 22:42:05 -04:00
parent affa3a2cb9
commit 0f9b046141
2 changed files with 2 additions and 7 deletions

View File

@ -2,9 +2,6 @@
to be tested for consistency. This is done
using the testcase 'test_chisquare' -->
<scene version="0.3.0">
<!-- Test the smooth plastic model -->
<bsdf type="plastic"/>
<!-- Test the smooth diffuse model -->
<bsdf type="diffuse"/>

View File

@ -211,7 +211,6 @@ public:
return Spectrum(0.0f);
Float Fr = fresnel(Frame::cosTheta(bRec.wi), m_extIOR, m_intIOR);
Float probSpecular = (Fr*m_specularSamplingWeight) /
(Fr*m_specularSamplingWeight +
(1-Fr) * (1-m_specularSamplingWeight));
@ -282,12 +281,11 @@ public:
bRec.sampledComponent = 1;
bRec.sampledType = EDiffuseReflection;
bRec.wo = squareToHemispherePSA(Point2(
(sample.x - Fr) / (1 - Fr),
(sample.x - probSpecular) / (1 - probSpecular),
sample.y
));
pdf = (1-probSpecular) * Frame::cosTheta(bRec.wo) * INV_PI;
return m_diffuseReflectance->getValue(bRec.its)
* (1-Fr) / (1-probSpecular);
}