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

Comparing ray/src/rt/ambient.c (file contents):
Revision 2.40 by greg, Tue Jul 9 21:56:44 1996 UTC vs.
Revision 2.42 by greg, Thu Jan 2 09:37:13 1997 UTC

# Line 50 | Line 50 | static int  nunflshed = 0;     /* number of unflushed ambi
50   #endif
51   #endif
52   #ifndef SORT_INTVL
53 < #define SORT_INTVL      (SORT_THRESH<<4)
53 > #define SORT_INTVL      (SORT_THRESH<<1)
54   #endif
55   #ifndef MAX_SORT_INTVL
56 < #define MAX_SORT_INTVL  (SORT_INTVL<<8)
56 > #define MAX_SORT_INTVL  (SORT_INTVL<<6)
57   #endif
58  
59   static COLOR  avsum = BLKCOLOR;         /* computed ambient value sum */
# Line 144 | Line 144 | char  *afile;
144                  pos += (long)nambvals*AMBVALSIZ;
145                  flen = lseek(fileno(ambfp), 0L, 2);
146                  if (flen != pos) {
147 <                        error(WARNING,
147 >                        sprintf(errmsg,
148                          "ignoring last %ld values in ambient file (corrupted)",
149                                          (flen - pos)/AMBVALSIZ);
150 +                        error(WARNING, errmsg);
151                          fseek(ambfp, pos, 0);
152                          ftruncate(fileno(ambfp), pos);
153                  }
# Line 403 | Line 404 | int  creat;
404          setbuf(ambfp, bmalloc(BUFSIZ+8));
405          if (creat) {                    /* new file */
406                  newheader("RADIANCE", ambfp);
407 <                fprintf(ambfp, "%s -av %g %g %g -ab %d -aa %g ",
407 >                fprintf(ambfp, "%s -av %g %g %g -aw %d -ab %d -aa %g ",
408                                  progname, colval(ambval,RED),
409                                  colval(ambval,GRN), colval(ambval,BLU),
410 <                                ambounce, ambacc);
410 >                                ambvwt, ambounce, ambacc);
411                  fprintf(ambfp, "-ad %d -as %d -ar %d %s\n",
412                                  ambdiv, ambssamp, ambres,
413                                  octname==NULL ? "" : octname);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines