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

Comparing ray/src/util/ranimove1.c (file contents):
Revision 3.9 by greg, Thu May 13 15:45:43 2004 UTC vs.
Revision 3.12 by greg, Tue Dec 20 03:49:51 2005 UTC

# Line 4 | Line 4 | static const char      RCSid[] = "$Id$";
4   /*
5   *  ranimove1.c
6   *
7 < *  Basic frame rendering routines for ranimate(1).
7 > *  Basic frame rendering routines for ranimove(1).
8   *
9   *  Created by Gregory Ward on Wed Jan 08 2003.
10   */
# Line 367 | Line 367 | init_frame_sample(void)                /* sample our initial frame *
367                          continue;
368                  }
369                  if (!sample_here(x, y)) {       /* just cast */
370 <                        rayorigin(&ir, NULL, PRIMARY, 1.0);
370 >                        rayorigin(&ir, PRIMARY, NULL, NULL);
371                          if (!localhit(&ir, &thescene)) {
372                                  if (ir.ro != &Aftplane)
373                                          sourcehit(&ir);
# Line 385 | Line 385 | init_frame_sample(void)                /* sample our initial frame *
385                  }
386                  if (nprocs > 1) {               /* get sample */
387                          int     rval;
388 <                        rayorigin(&ir, NULL, PRIMARY, 1.0);
388 >                        rayorigin(&ir, PRIMARY, NULL, NULL);
389                          ir.rno = n;
390                          rval = ray_pqueue(&ir);
391                          if (!rval)
# Line 762 | Line 762 | filter_frame(void)                     /* interpolation, motion-blur, an
762                          continue;
763                  nc = getclosest(neigh, NPINTERP, x, y);
764                  setcolor(cbuffer[n], 0., 0., 0.);
765 +                if (nc <= 0) {          /* no acceptable neighbors */
766 +                        if (y < vres-1)
767 +                                nc = fndx(x, y+1);
768 +                        else if (x < hres-1)
769 +                                nc = fndx(x+1, y);
770 +                        else
771 +                                continue;
772 +                        copycolor(cbuffer[n], cbuffer[nc]);
773 +                        continue;
774 +                }
775                  wsum = 0.;
776                  while (nc-- > 0) {
777                          copycolor(cval, cbuffer[neigh[nc]]);
# Line 771 | Line 781 | filter_frame(void)                     /* interpolation, motion-blur, an
781                          addcolor(cbuffer[n], cval);
782                          wsum += w;
783                  }
784 <                if (wsum > FTINY) {
785 <                        w = 1.0/wsum;
776 <                        scalecolor(cbuffer[n], w);
777 <                }
784 >                w = 1.0/wsum;
785 >                scalecolor(cbuffer[n], w);
786              }
787                                          /* motion blur if requested */
788          if (mblur > .02) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines