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

Comparing ray/src/common/bsdf.c (file contents):
Revision 2.47 by greg, Sun Mar 23 23:15:53 2014 UTC vs.
Revision 2.49 by greg, Mon Dec 8 23:51:12 2014 UTC

# Line 558 | Line 558 | SDdiffuseSamp(FVECT outVec, int outFront, double randX
558          SDmultiSamp(outVec, 2, randX);
559          SDsquare2disk(outVec, outVec[0], outVec[1]);
560          outVec[2] = 1. - outVec[0]*outVec[0] - outVec[1]*outVec[1];
561 <        if (outVec[2] > 0)              /* a bit of paranoia */
562 <                outVec[2] = sqrt(outVec[2]);
561 >        outVec[2] = sqrt(outVec[2]*(outVec[2]>0));
562          if (!outFront)                  /* going out back? */
563                  outVec[2] = -outVec[2];
564   }
# Line 764 | Line 763 | SDsampBSDF(SDValue *sv, FVECT ioVec, double randX, int
763                  cdarr[i] = (*rdf->comp[i].func->getCDist)(inVec, &rdf->comp[i]);
764                  if (cdarr[i] == NULL)
765                          cdarr[i] = &SDemptyCD;
766 <                else
768 <                        sv->cieY += cdarr[i]->cTotal;
766 >                sv->cieY += cdarr[i]->cTotal;
767          }
768          if (sv->cieY <= 1e-6) {         /* anything to sample? */
769                  sv->cieY = .0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines