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

Comparing ray/src/common/bsdf_t.c (file contents):
Revision 3.31 by greg, Thu Aug 8 05:26:56 2013 UTC vs.
Revision 3.32 by greg, Mon Mar 17 01:53:51 2014 UTC

# Line 284 | Line 284 | SDdotravTre(const SDNode *st, const double *pos, int c
284                  unsigned        skipmask = 0;
285                  csiz *= .5;
286                  for (i = st->ndim; i--; )
287 <                        if (1<<i & cmask)
287 >                        if (1<<i & cmask) {
288                                  if (pos[i] < cmin[i] + csiz)
289                                          for (n = 1 << st->ndim; n--; ) {
290                                                  if (n & 1<<i)
# Line 295 | Line 295 | SDdotravTre(const SDNode *st, const double *pos, int c
295                                                  if (!(n & 1<<i))
296                                                          skipmask |= 1<<n;
297                                          }
298 +                        }
299                  for (n = 1 << st->ndim; n--; ) {
300                          if (1<<n & skipmask)
301                                  continue;
# Line 799 | Line 800 | SDsampTreCDist(FVECT ioVec, double randX, const SDCDst
800          SDsquare2disk(gpos, gpos[0], gpos[1]);
801                                          /* compute Z-coordinate */
802          gpos[2] = 1. - gpos[0]*gpos[0] - gpos[1]*gpos[1];
803 <        if (gpos[2] > 0)                /* paranoia, I hope */
803 <                gpos[2] = sqrt(gpos[2]);
803 >        gpos[2] = sqrt(gpos[2]*(gpos[2]>0));
804                                          /* emit from back? */
805          if ((cd->sidef == SD_BREFL) | (cd->sidef == SD_FXMIT))
806                  gpos[2] = -gpos[2];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines