# | 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) */ |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |