ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cv/bsdfmesh.c
(Generate patch)

Comparing ray/src/cv/bsdfmesh.c (file contents):
Revision 2.33 by greg, Fri Aug 22 05:38:44 2014 UTC vs.
Revision 2.34 by greg, Fri Jan 29 16:21:55 2016 UTC

# Line 99 | Line 99 | est_DSFrad(const RBFNODE *rbf, const FVECT outvec)
99   static void
100   comp_bsdf_spec(void)
101   {
102 +        const double    max_hemi = 0.9;
103          double          peak_sum = 0;
104          double          rad_sum = 0;
105          int             n = 0;
# Line 120 | Line 121 | comp_bsdf_spec(void)
121          }
122          bsdf_spec_peak = peak_sum/(double)n;
123          bsdf_spec_rad = rad_sum/(double)n;
124 +        if ((2.*M_PI)*bsdf_spec_peak*bsdf_spec_rad*bsdf_spec_rad > max_hemi)
125 +                bsdf_spec_peak = max_hemi/((2.*M_PI)*bsdf_spec_rad*bsdf_spec_rad);
126   }
127  
128   /* Create a new migration holder (sharing memory for multiprocessing) */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines