A few more cosines to get straight
parent
0e05949f2c
commit
b605c5e937
|
@ -255,8 +255,9 @@ public:
|
||||||
if (measure == ESolidAngle) {
|
if (measure == ESolidAngle) {
|
||||||
Float eta = m_extIOR / m_intIOR;
|
Float eta = m_extIOR / m_intIOR;
|
||||||
/* Solid angle compression & irradiance conversion factors */
|
/* Solid angle compression & irradiance conversion factors */
|
||||||
result *= eta * eta * std::abs(Frame::cosTheta(bRec.wi)
|
result *= eta * eta *
|
||||||
/ Frame::cosTheta(bRecInt.wi));
|
Frame::cosTheta(bRec.wi) * Frame::cosTheta(bRec.wo)
|
||||||
|
/ (Frame::cosTheta(bRecInt.wi) * Frame::cosTheta(bRecInt.wo));
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -295,8 +296,8 @@ public:
|
||||||
|
|
||||||
if (measure == ESolidAngle) {
|
if (measure == ESolidAngle) {
|
||||||
Float eta = m_extIOR / m_intIOR;
|
Float eta = m_extIOR / m_intIOR;
|
||||||
pdf *= eta * eta * std::abs(Frame::cosTheta(bRec.wo)
|
pdf *= eta * eta * Frame::cosTheta(bRec.wo)
|
||||||
/ Frame::cosTheta(bRecInt.wo));
|
/ Frame::cosTheta(bRecInt.wo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -371,13 +372,13 @@ public:
|
||||||
result *= (1 - R12) * (1 - R21);
|
result *= (1 - R12) * (1 - R21);
|
||||||
|
|
||||||
if (BSDF::getMeasure(bRec.sampledType) == ESolidAngle) {
|
if (BSDF::getMeasure(bRec.sampledType) == ESolidAngle) {
|
||||||
Float eta = m_extIOR / m_intIOR, etaSqr = eta*eta;
|
|
||||||
/* Solid angle compression & irradiance conversion factors */
|
/* Solid angle compression & irradiance conversion factors */
|
||||||
|
Float eta = m_extIOR / m_intIOR, etaSqr = eta*eta;
|
||||||
|
Float temp = Frame::cosTheta(bRec.wo) / Frame::cosTheta(woPrime);
|
||||||
|
|
||||||
result *= etaSqr *
|
result *= etaSqr *
|
||||||
std::abs(Frame::cosTheta(bRec.wi) / Frame::cosTheta(wiPrime));
|
Frame::cosTheta(bRec.wi) / Frame::cosTheta(wiPrime) * temp;
|
||||||
pdf *= etaSqr *
|
pdf *= etaSqr * temp;
|
||||||
std::abs(Frame::cosTheta(bRec.wo) / Frame::cosTheta(woPrime));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -215,9 +215,8 @@ public:
|
||||||
((-tauD/std::abs(cosThetaI)).exp() - (-tauD/std::abs(cosThetaO)).exp());
|
((-tauD/std::abs(cosThetaI)).exp() - (-tauD/std::abs(cosThetaO)).exp());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return result * std::abs(cosThetaO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue