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

Comparing ray/src/rt/rpict.c (file contents):
Revision 1.27 by greg, Wed Jun 19 16:36:34 1991 UTC vs.
Revision 1.31 by greg, Tue Aug 13 12:16:34 1991 UTC

# Line 41 | Line 41 | double  dstrsrc = 0.0;                 /* square source distribution
41   double  shadthresh = .05;               /* shadow threshold */
42   double  shadcert = .5;                  /* shadow certainty */
43   int  directrelay = 0;                   /* number of source relays */
44 + int  vspretest = 512;                   /* virtual source pretest density */
45 + int  directinvis = 0;                   /* sources invisible? */
46  
47   int  maxdepth = 6;                      /* maximum recursion depth */
48   double  minweight = 5e-3;               /* minimum ray weight */
# Line 352 | Line 354 | int  x, y;                     /* pixel position */
354  
355          rayorigin(&thisray, NULL, PRIMARY, 1.0);
356  
357 <        samplendx = 3*y + x;                    /* set pixel index */
357 >        samplendx = pixnumber(x,y,hresolu,vresolu);     /* set pixel index */
358  
359          rayvalue(&thisray);                     /* trace ray */
360  
# Line 411 | Line 413 | char  *oldfile;
413          return(y);
414   writerr:
415          error(SYSTEM, "write error in salvage");
416 + }
417 +
418 +
419 + int
420 + pixnumber(x, y, xres, yres)             /* compute pixel index (brushed) */
421 + register int  x, y;
422 + int  xres, yres;
423 + {
424 +        x -= y;
425 +        while (x < 0)
426 +                x += xres;
427 +        return((((x>>2)*yres + y) << 2) + (x & 3));
428   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines