diff --git a/zenovis/xinxinoptix/DisneyBSDF.h b/zenovis/xinxinoptix/DisneyBSDF.h index 12766a4a9..1716320f0 100644 --- a/zenovis/xinxinoptix/DisneyBSDF.h +++ b/zenovis/xinxinoptix/DisneyBSDF.h @@ -462,8 +462,9 @@ namespace DisneyBSDF{ } else { if(thin) { - vec3 t = sqrt(mix(mat.transColor, mat.diffractColor, mat.diffraction)) * glassWt; - float tmpPdf = (reflectance==false)? 0.0f:1.0f; + vec3 t = sqrt(mix(mat.transColor, mat.diffractColor, mat.diffraction)) * glassWt / (1e-6+abs(wi.z)); + float F = BRDFBasics::DielectricFresnel(abs(wo.z), entering?mat.ior:1.0/mat.ior); + float tmpPdf = reflectance ? (1.0f-F) : 0.0f; t = t * (tmpPdf>0.0f?1.0f:0.0f); tterm = tterm + t; f = f + t;