diff options
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/kernel/closure/bsdf_microfacet.h | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/intern/cycles/kernel/closure/bsdf_microfacet.h b/intern/cycles/kernel/closure/bsdf_microfacet.h index 6a50bbed3b3..2a0e8f62e7c 100644 --- a/intern/cycles/kernel/closure/bsdf_microfacet.h +++ b/intern/cycles/kernel/closure/bsdf_microfacet.h @@ -382,10 +382,6 @@ ccl_device float3 bsdf_microfacet_ggx_eval_transmit(const ShaderClosure *sc, con float cosHO = dot(Ht, I); float cosHI = dot(Ht, omega_in); - /* those situations makes chi+ terms in eq. 33, 34 be zero */ - if(dot(Ht, N) <= 0.0f || cosHO * cosNO <= 0.0f || cosHI * cosNI <= 0.0f) - return make_float3(0.0f, 0.0f, 0.0f); - float D, G1o, G1i; /* eq. 33: first we calculate D(m) with m=Ht: */ @@ -412,7 +408,7 @@ ccl_device float3 bsdf_microfacet_ggx_eval_transmit(const ShaderClosure *sc, con * pdf = pm * (m_eta * m_eta) * fabsf(cosHI) / Ht2 */ float common = D * (m_eta * m_eta) / (cosNO * Ht2); float out = G * fabsf(cosHI * cosHO) * common; - *pdf = G1o * cosHO * fabsf(cosHI) * common; + *pdf = G1o * fabsf(cosHO * cosHI) * common; return make_float3(out, out, out); } @@ -735,10 +731,6 @@ ccl_device float3 bsdf_microfacet_beckmann_eval_transmit(const ShaderClosure *sc float cosHO = dot(Ht, I); float cosHI = dot(Ht, omega_in); - /* those situations makes chi+ terms in eq. 25, 27 be zero */ - if(dot(Ht, N) <= 0.0f || cosHO * cosNO <= 0.0f || cosHI * cosNI <= 0.0f) - return make_float3(0.0f, 0.0f, 0.0f); - /* eq. 25: first we calculate D(m) with m=Ht: */ float alpha2 = alpha_x * alpha_y; float cosThetaM = min(dot(N, Ht), 1.0f); @@ -764,7 +756,7 @@ ccl_device float3 bsdf_microfacet_beckmann_eval_transmit(const ShaderClosure *sc * pdf = pm * (m_eta * m_eta) * fabsf(cosHI) / Ht2 */ float common = D * (m_eta * m_eta) / (cosNO * Ht2); float out = G * fabsf(cosHI * cosHO) * common; - *pdf = G1o * cosHO * fabsf(cosHI) * common; + *pdf = G1o * fabsf(cosHO * cosHI) * common; return make_float3(out, out, out); } |