diff --git a/data/tests/test_bidir_0.xml b/data/tests/test_bidir_0.xml index 14179ac3..0190f279 100644 --- a/data/tests/test_bidir_0.xml +++ b/data/tests/test_bidir_0.xml @@ -1,4 +1,4 @@ - + diff --git a/data/tests/test_bidir_1.xml b/data/tests/test_bidir_1.xml index 1e68a7d0..dfe0b534 100644 --- a/data/tests/test_bidir_1.xml +++ b/data/tests/test_bidir_1.xml @@ -1,4 +1,4 @@ - + diff --git a/data/tests/test_bidir_2.xml b/data/tests/test_bidir_2.xml index f869cb38..a48722d3 100644 --- a/data/tests/test_bidir_2.xml +++ b/data/tests/test_bidir_2.xml @@ -1,4 +1,4 @@ - + diff --git a/data/tests/test_bsdf.xml b/data/tests/test_bsdf.xml index ceaaee9a..725b4447 100644 --- a/data/tests/test_bsdf.xml +++ b/data/tests/test_bsdf.xml @@ -1,12 +1,12 @@ - + - + @@ -54,7 +54,7 @@ - + @@ -66,8 +66,8 @@ - - @@ -75,7 +75,7 @@ - @@ -84,7 +84,7 @@ - @@ -93,7 +93,7 @@ - @@ -112,7 +112,7 @@ - @@ -128,7 +128,7 @@ - diff --git a/data/tests/test_emitter.xml b/data/tests/test_emitter.xml index 89b0fadb..91c138c5 100644 --- a/data/tests/test_emitter.xml +++ b/data/tests/test_emitter.xml @@ -1,8 +1,8 @@ - - diff --git a/data/tests/test_phase.xml b/data/tests/test_phase.xml index e32e95c2..479abc08 100644 --- a/data/tests/test_phase.xml +++ b/data/tests/test_phase.xml @@ -1,7 +1,7 @@ - + @@ -19,7 +19,7 @@ - + diff --git a/src/bsdfs/plastic.cpp b/src/bsdfs/plastic.cpp index b134f27e..aa99bd0f 100644 --- a/src/bsdfs/plastic.cpp +++ b/src/bsdfs/plastic.cpp @@ -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