chi-square test fixes

metadata
Wenzel Jakob 2014-07-01 12:21:23 +02:00
parent c81b015cea
commit 641f0a96dd
7 changed files with 23 additions and 24 deletions

View File

@ -1,4 +1,4 @@
<scene version="0.4.0">
<scene version="0.5.0">
<integrator type="ptracer"/>
<shape type="disk">

View File

@ -1,4 +1,4 @@
<scene version="0.4.0">
<scene version="0.5.0">
<sensor type="radiancemeter">
<transform name="toWorld">
<lookAt origin="0, 0, -1" target="0, 0, 0"/>

View File

@ -1,4 +1,4 @@
<scene version="0.4.0">
<scene version="0.5.0">
<medium id="medium" type="homogeneous">
<spectrum name="sigmaS" value="0"/>
<spectrum name="sigmaA" value="1"/>

View File

@ -1,7 +1,7 @@
<!-- This file defines a series of BSDF instances
to be tested for consistency. This is done
using the testcase 'test_chisquare' -->
<scene version="0.4.0">
<scene version="0.5.0">
<!-- Test the smooth plastic model with preserveColors=false -->
<bsdf type="plastic">
<boolean name="preserveColors" value="false"/>

View File

@ -1,7 +1,7 @@
<!-- This file defines a series of emitter instances
to be tested for consistency. This is done using the
testcase 'test_chisquare' -->
<scene version="0.4.0">
<scene version="0.5.0">
<!-- Test the emitter emitter
<emitter type="emitter"/>
-->

View File

@ -1,7 +1,7 @@
<!-- This file defines a series of phase function instances
to be tested for consistency. This is done using the
testcase 'test_chisquare' -->
<scene version="0.3.0">
<scene version="0.5.0">
<!-- Test the isotropic phase function -->
<phase type="isotropic"/>

View File

@ -329,8 +329,8 @@ public:
bRec.sampledType = EDeltaReflection;
bRec.wo = reflect(bRec.wi);
return m_specularReflectance->eval(bRec.its) *
(Fi / probSpecular);
return m_specularReflectance->eval(bRec.its)
* Fi / probSpecular;
} else {
bRec.sampledComponent = 1;
bRec.sampledType = EDiffuseReflection;
@ -354,13 +354,12 @@ public:
bRec.wo = reflect(bRec.wi);
return m_specularReflectance->eval(bRec.its) * Fi;
} else {
bRec.wo = Warp::squareToCosineHemisphere(sample);
Float Fo = fresnelDielectricExt(Frame::cosTheta(bRec.wo), m_eta);
bRec.sampledComponent = 1;
bRec.sampledType = EDiffuseReflection;
bRec.wo = Warp::squareToCosineHemisphere(sample);
Float Fo = fresnelDielectricExt(Frame::cosTheta(bRec.wo), m_eta);
Spectrum diff = m_diffuseReflectance->eval(bRec.its);
diff /= Spectrum(1.0f) - m_fdrInt*diff;
if (m_nonlinear)
diff /= Spectrum(1.0f) - diff*m_fdrInt;
else