chi-square test fixes
parent
c81b015cea
commit
641f0a96dd
|
@ -1,4 +1,4 @@
|
||||||
<scene version="0.4.0">
|
<scene version="0.5.0">
|
||||||
<integrator type="ptracer"/>
|
<integrator type="ptracer"/>
|
||||||
|
|
||||||
<shape type="disk">
|
<shape type="disk">
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<scene version="0.4.0">
|
<scene version="0.5.0">
|
||||||
<sensor type="radiancemeter">
|
<sensor type="radiancemeter">
|
||||||
<transform name="toWorld">
|
<transform name="toWorld">
|
||||||
<lookAt origin="0, 0, -1" target="0, 0, 0"/>
|
<lookAt origin="0, 0, -1" target="0, 0, 0"/>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<scene version="0.4.0">
|
<scene version="0.5.0">
|
||||||
<medium id="medium" type="homogeneous">
|
<medium id="medium" type="homogeneous">
|
||||||
<spectrum name="sigmaS" value="0"/>
|
<spectrum name="sigmaS" value="0"/>
|
||||||
<spectrum name="sigmaA" value="1"/>
|
<spectrum name="sigmaA" value="1"/>
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<!-- This file defines a series of BSDF instances
|
<!-- This file defines a series of BSDF instances
|
||||||
to be tested for consistency. This is done
|
to be tested for consistency. This is done
|
||||||
using the testcase 'test_chisquare' -->
|
using the testcase 'test_chisquare' -->
|
||||||
<scene version="0.4.0">
|
<scene version="0.5.0">
|
||||||
<!-- Test the smooth plastic model with preserveColors=false -->
|
<!-- Test the smooth plastic model with preserveColors=false -->
|
||||||
<bsdf type="plastic">
|
<bsdf type="plastic">
|
||||||
<boolean name="preserveColors" value="false"/>
|
<boolean name="preserveColors" value="false"/>
|
||||||
</bsdf>
|
</bsdf>
|
||||||
|
|
||||||
<!-- Test the smooth plastic model with preserveColors=true -->
|
<!-- Test the smooth plastic model with preserveColors=true -->
|
||||||
<bsdf type="plastic">
|
<bsdf type="plastic">
|
||||||
<boolean name="preserveColors" value="true"/>
|
<boolean name="preserveColors" value="true"/>
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
<bsdf type="dielectric"/>
|
<bsdf type="dielectric"/>
|
||||||
<bsdf type="conductor"/>
|
<bsdf type="conductor"/>
|
||||||
</bsdf>
|
</bsdf>
|
||||||
|
|
||||||
<!-- Test a mixturebsdf of degenerate and
|
<!-- Test a mixturebsdf of degenerate and
|
||||||
non-degenerate materials -->
|
non-degenerate materials -->
|
||||||
<bsdf type="mixturebsdf">
|
<bsdf type="mixturebsdf">
|
||||||
|
@ -66,8 +66,8 @@
|
||||||
<!-- Test the Hanrahan-Krueger model with an
|
<!-- Test the Hanrahan-Krueger model with an
|
||||||
isotropic phase function -->
|
isotropic phase function -->
|
||||||
<bsdf type="hk"/>
|
<bsdf type="hk"/>
|
||||||
|
|
||||||
<!-- Test the Hanrahan-Krueger model with a
|
<!-- Test the Hanrahan-Krueger model with a
|
||||||
forward-scattering phase function -->
|
forward-scattering phase function -->
|
||||||
<bsdf type="hk">
|
<bsdf type="hk">
|
||||||
<phase type="hg">
|
<phase type="hg">
|
||||||
|
@ -75,7 +75,7 @@
|
||||||
</phase>
|
</phase>
|
||||||
</bsdf>
|
</bsdf>
|
||||||
|
|
||||||
<!-- Test the rough glass model with the
|
<!-- Test the rough glass model with the
|
||||||
Beckmann microfacet distribution -->
|
Beckmann microfacet distribution -->
|
||||||
<bsdf type="roughdielectric">
|
<bsdf type="roughdielectric">
|
||||||
<string name="distribution" value="beckmann"/>
|
<string name="distribution" value="beckmann"/>
|
||||||
|
@ -84,7 +84,7 @@
|
||||||
<float name="extIOR" value="1.0"/>
|
<float name="extIOR" value="1.0"/>
|
||||||
</bsdf>
|
</bsdf>
|
||||||
|
|
||||||
<!-- Test the rough glass model with the
|
<!-- Test the rough glass model with the
|
||||||
Phong microfacet distribution -->
|
Phong microfacet distribution -->
|
||||||
<bsdf type="roughdielectric">
|
<bsdf type="roughdielectric">
|
||||||
<string name="distribution" value="phong"/>
|
<string name="distribution" value="phong"/>
|
||||||
|
@ -93,7 +93,7 @@
|
||||||
<float name="extIOR" value="1.0"/>
|
<float name="extIOR" value="1.0"/>
|
||||||
</bsdf>
|
</bsdf>
|
||||||
|
|
||||||
<!-- Test the rough glass model with the
|
<!-- Test the rough glass model with the
|
||||||
GGX microfacet distribution -->
|
GGX microfacet distribution -->
|
||||||
<bsdf type="roughdielectric">
|
<bsdf type="roughdielectric">
|
||||||
<string name="distribution" value="ggx"/>
|
<string name="distribution" value="ggx"/>
|
||||||
|
@ -112,7 +112,7 @@
|
||||||
<float name="extIOR" value="1.0"/>
|
<float name="extIOR" value="1.0"/>
|
||||||
</bsdf>
|
</bsdf>
|
||||||
|
|
||||||
<!-- Test the rough conductor model with the
|
<!-- Test the rough conductor model with the
|
||||||
Beckmann microfacet distribution -->
|
Beckmann microfacet distribution -->
|
||||||
<bsdf type="roughconductor">
|
<bsdf type="roughconductor">
|
||||||
<string name="distribution" value="beckmann"/>
|
<string name="distribution" value="beckmann"/>
|
||||||
|
@ -128,7 +128,7 @@
|
||||||
<float name="alphaV" value="0.3"/>
|
<float name="alphaV" value="0.3"/>
|
||||||
</bsdf>
|
</bsdf>
|
||||||
|
|
||||||
<!-- Test the rough plastic model with the
|
<!-- Test the rough plastic model with the
|
||||||
Beckmann microfacet distribution -->
|
Beckmann microfacet distribution -->
|
||||||
<bsdf type="roughplastic">
|
<bsdf type="roughplastic">
|
||||||
<string name="distribution" value="beckmann"/>
|
<string name="distribution" value="beckmann"/>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<!-- This file defines a series of emitter instances
|
<!-- 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' -->
|
testcase 'test_chisquare' -->
|
||||||
<scene version="0.4.0">
|
<scene version="0.5.0">
|
||||||
<!-- Test the emitter emitter
|
<!-- Test the emitter emitter
|
||||||
<emitter type="emitter"/>
|
<emitter type="emitter"/>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<!-- This file defines a series of phase function instances
|
<!-- 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' -->
|
testcase 'test_chisquare' -->
|
||||||
<scene version="0.3.0">
|
<scene version="0.5.0">
|
||||||
<!-- Test the isotropic phase function -->
|
<!-- Test the isotropic phase function -->
|
||||||
<phase type="isotropic"/>
|
<phase type="isotropic"/>
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
<phase type="hg">
|
<phase type="hg">
|
||||||
<float name="g" value="-0.3"/>
|
<float name="g" value="-0.3"/>
|
||||||
</phase>
|
</phase>
|
||||||
|
|
||||||
<!-- Test the micro-flake phase function -->
|
<!-- Test the micro-flake phase function -->
|
||||||
<phase type="microflake">
|
<phase type="microflake">
|
||||||
<float name="stddev" value="0.1"/>
|
<float name="stddev" value="0.1"/>
|
||||||
|
|
|
@ -329,8 +329,8 @@ public:
|
||||||
bRec.sampledType = EDeltaReflection;
|
bRec.sampledType = EDeltaReflection;
|
||||||
bRec.wo = reflect(bRec.wi);
|
bRec.wo = reflect(bRec.wi);
|
||||||
|
|
||||||
return m_specularReflectance->eval(bRec.its) *
|
return m_specularReflectance->eval(bRec.its)
|
||||||
(Fi / probSpecular);
|
* Fi / probSpecular;
|
||||||
} else {
|
} else {
|
||||||
bRec.sampledComponent = 1;
|
bRec.sampledComponent = 1;
|
||||||
bRec.sampledType = EDiffuseReflection;
|
bRec.sampledType = EDiffuseReflection;
|
||||||
|
@ -354,13 +354,12 @@ public:
|
||||||
bRec.wo = reflect(bRec.wi);
|
bRec.wo = reflect(bRec.wi);
|
||||||
return m_specularReflectance->eval(bRec.its) * Fi;
|
return m_specularReflectance->eval(bRec.its) * Fi;
|
||||||
} else {
|
} else {
|
||||||
bRec.wo = Warp::squareToCosineHemisphere(sample);
|
|
||||||
Float Fo = fresnelDielectricExt(Frame::cosTheta(bRec.wo), m_eta);
|
|
||||||
bRec.sampledComponent = 1;
|
bRec.sampledComponent = 1;
|
||||||
bRec.sampledType = EDiffuseReflection;
|
bRec.sampledType = EDiffuseReflection;
|
||||||
|
bRec.wo = Warp::squareToCosineHemisphere(sample);
|
||||||
|
Float Fo = fresnelDielectricExt(Frame::cosTheta(bRec.wo), m_eta);
|
||||||
|
|
||||||
Spectrum diff = m_diffuseReflectance->eval(bRec.its);
|
Spectrum diff = m_diffuseReflectance->eval(bRec.its);
|
||||||
diff /= Spectrum(1.0f) - m_fdrInt*diff;
|
|
||||||
if (m_nonlinear)
|
if (m_nonlinear)
|
||||||
diff /= Spectrum(1.0f) - diff*m_fdrInt;
|
diff /= Spectrum(1.0f) - diff*m_fdrInt;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue