getting there..
parent
affa3a2cb9
commit
0f9b046141
|
@ -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"/>
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue