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

Comparing ray/src/util/rad.c (file contents):
Revision 2.126 by greg, Tue Feb 26 23:31:11 2019 UTC vs.
Revision 2.129 by greg, Sun Feb 6 17:19:55 2022 UTC

# Line 242 | Line 242 | main(
242                                  /* load variable values */
243          loadvars(rifname);
244                                  /* get any additional assignments */
245 <        for (i++; i < argc; i++)
246 <                if (setvariable(argv[i], matchvar) < 0) {
247 <                        fprintf(stderr, "%s: unknown variable: %s\n",
245 >        for (i++; i < argc; i++) {
246 >                int     rv = setvariable(argv[i], matchvar);
247 >                if (rv < 0) {
248 >                        fprintf(stderr, "%s: unknown setting: %s\n",
249                                          progname, argv[i]);
250                          quit(1);
251                  }
252 +                if (!rv)
253 +                        fprintf(stderr,
254 +                        "%s: bad variable assignment: %s (ignored)\n",
255 +                                        progname, argv[i]);
256 +        }
257                                  /* check assignments */
258          checkvalues();
259                                  /* check files and dates */
# Line 790 | Line 796 | ambval(void)                           /* compute ambient value */
796   {
797          if (vdef(EXPOSURE)) {
798                  if (vval(EXPOSURE)[0] == '+' || vval(EXPOSURE)[0] == '-')
799 <                        return(.5/pow(2.,vflt(EXPOSURE)));
800 <                return(.5/vflt(EXPOSURE));
799 >                        return(.18/pow(2.,vflt(EXPOSURE)));
800 >                return(.18/vflt(EXPOSURE));
801          }
802          if (vlet(ZONE) == 'E')
803                  return(10.);
# Line 834 | Line 840 | renderopts(                    /* set rendering options */
840                  op = addarg(addarg(op, "-ap"), pmapf);
841                  if (atoi(bw) > 0) op = addarg(op, bw);
842          }
843 <        if (vdef(RENDER))
843 >        if (vdef(RENDER)) {
844                  op = addarg(op, vval(RENDER));
845 +                bw = strstr(vval(RENDER), "-aa ");
846 +                if (bw != NULL && atof(bw+4) <= FTINY)
847 +                        overture = 0;
848 +        }
849          if (rvdevice != NULL) {
850                  if (vdef(RVU)) {
851                          if (vval(RVU)[0] != '-') {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines