From 5b413228e141f51f1dec1223dae1a91cbfc7d2f9 Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Wed, 12 Feb 2014 11:51:24 +0100 Subject: [PATCH] stupid old bug in thindielectric.cpp was still there because I had only fixed it in one of two places... --- src/bsdfs/thindielectric.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bsdfs/thindielectric.cpp b/src/bsdfs/thindielectric.cpp index f586dc00..903fa024 100644 --- a/src/bsdfs/thindielectric.cpp +++ b/src/bsdfs/thindielectric.cpp @@ -206,7 +206,7 @@ public: bool sampleTransmission = (bRec.typeMask & ENull) && (bRec.component == -1 || bRec.component == 1); - Float R = fresnelDielectricExt(Frame::cosTheta(bRec.wi), m_eta), T = 1-R; + Float R = fresnelDielectricExt(std::abs(Frame::cosTheta(bRec.wi)), m_eta), T = 1-R; // Account for internal reflections: R' = R + TRT + TR^3T + .. if (R < 1)