Skip to content

Commit

Permalink
fix thin glass
Browse files Browse the repository at this point in the history
  • Loading branch information
teachmain committed Oct 16, 2024
1 parent 33862f0 commit b3ebb77
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion zenovis/xinxinoptix/DisneyBSDF.h
Original file line number Diff line number Diff line change
Expand Up @@ -499,8 +499,10 @@ namespace DisneyBSDF{
} else {
if(thin)
{
vec3 t = sqrt(mix(mat.transColor, mat.diffractColor, mat.diffraction)) * glassWt;
vec3 t = sqrt(mix(mat.transColor, mat.diffractColor, mat.diffraction)) * glassWt / abs(wi.z);
float tmpPdf = (reflectance==false)? 0.0f:1.0f;
float F = BRDFBasics::DielectricFresnel(abs(wo.z), entering?mat.ior:1.0/mat.ior);
tmpPdf *= (1.0f-F);
t = t * (tmpPdf>0.0f?1.0f:0.0f);
tterm = tterm + t;
f = f + t;
Expand Down

0 comments on commit b3ebb77

Please sign in to comment.