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,12 +1,12 @@
<!-- 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"/>
</bsdf>
<!-- Test the smooth plastic model with preserveColors=true -->
<bsdf type="plastic">
<boolean name="preserveColors" value="true"/>
@ -54,7 +54,7 @@
<bsdf type="dielectric"/>
<bsdf type="conductor"/>
</bsdf>
<!-- Test a mixturebsdf of degenerate and
non-degenerate materials -->
<bsdf type="mixturebsdf">
@ -66,8 +66,8 @@
<!-- Test the Hanrahan-Krueger model with an
isotropic phase function -->
<bsdf type="hk"/>
<!-- Test the Hanrahan-Krueger model with a
<!-- Test the Hanrahan-Krueger model with a
forward-scattering phase function -->
<bsdf type="hk">
<phase type="hg">
@ -75,7 +75,7 @@
</phase>
</bsdf>
<!-- Test the rough glass model with the
<!-- Test the rough glass model with the
Beckmann microfacet distribution -->
<bsdf type="roughdielectric">
<string name="distribution" value="beckmann"/>
@ -84,7 +84,7 @@
<float name="extIOR" value="1.0"/>
</bsdf>
<!-- Test the rough glass model with the
<!-- Test the rough glass model with the
Phong microfacet distribution -->
<bsdf type="roughdielectric">
<string name="distribution" value="phong"/>
@ -93,7 +93,7 @@
<float name="extIOR" value="1.0"/>
</bsdf>
<!-- Test the rough glass model with the
<!-- Test the rough glass model with the
GGX microfacet distribution -->
<bsdf type="roughdielectric">
<string name="distribution" value="ggx"/>
@ -112,7 +112,7 @@
<float name="extIOR" value="1.0"/>
</bsdf>
<!-- Test the rough conductor model with the
<!-- Test the rough conductor model with the
Beckmann microfacet distribution -->
<bsdf type="roughconductor">
<string name="distribution" value="beckmann"/>
@ -128,7 +128,7 @@
<float name="alphaV" value="0.3"/>
</bsdf>
<!-- Test the rough plastic model with the
<!-- Test the rough plastic model with the
Beckmann microfacet distribution -->
<bsdf type="roughplastic">
<string name="distribution" value="beckmann"/>

View File

@ -1,8 +1,8 @@
<!-- This file defines a series of emitter instances
to be tested for consistency. This is done using the
to be tested for consistency. This is done using the
testcase 'test_chisquare' -->
<scene version="0.4.0">
<!-- Test the emitter emitter
<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
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"/>
@ -19,7 +19,7 @@
<phase type="hg">
<float name="g" value="-0.3"/>
</phase>
<!-- Test the micro-flake phase function -->
<phase type="microflake">
<float name="stddev" value="0.1"/>

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