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

Comparing ray/src/rt/rv3.c (file contents):
Revision 2.15 by greg, Fri Jan 21 00:52:59 2005 UTC vs.
Revision 2.18 by greg, Mon Jun 13 20:07:56 2005 UTC

# Line 108 | Line 108 | double  *mp;
108                          return(-1);
109                  }
110                  if (!direc || ourview.type == VT_PAR) {
111 <                        rayorigin(&thisray, NULL, PRIMARY, 1.0);
111 >                        rayorigin(&thisray, PRIMARY, NULL, NULL);
112                          if (!localhit(&thisray, &thescene)) {
113                                  error(COMMAND, "not a local object");
114                                  return(-1);
# Line 170 | Line 170 | int  xmin, ymin, xmax, ymax;
170                          h/hresolu, v/vresolu)) < -FTINY) {
171                  setcolor(thisray.rcol, 0.0, 0.0, 0.0);
172          } else {
173 <                rayorigin(&thisray, NULL, PRIMARY, 1.0);
174 <                samplendx++;
173 >                rayorigin(&thisray, PRIMARY, NULL, NULL);
174 >                samplendx = rand_samp ? random() : samplendx+1;
175                  rayvalue(&thisray);
176          }
177  
# Line 416 | Line 416 | FVECT  vc;
416                          nv.vaft += d - d*mag;
417                          if (nv.vaft <= nv.vfore) nv.vaft = 0.0;
418                  }
419 <                nv.vdist += d - d*mag;
419 >                nv.vdist /= mag;
420          }
421          for (i = 0; i < 3; i++)
422                  nv.vp[i] = vc[i] - d*nv.vdir[i];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines