--- ray/src/rt/ambient.c 2014/05/09 23:08:50 2.88 +++ ray/src/rt/ambient.c 2014/06/19 16:26:55 2.91 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: ambient.c,v 2.88 2014/05/09 23:08:50 greg Exp $"; +static const char RCSid[] = "$Id: ambient.c,v 2.91 2014/06/19 16:26:55 greg Exp $"; #endif /* * ambient.c - routines dealing with ambient (inter-reflected) component. @@ -109,12 +109,12 @@ setambres( /* set ambient resolution */ /* set min & max radii */ if (ar <= 0) { minarad = 0; - maxarad = thescene.cusize*0.5; + maxarad = thescene.cusize*0.2; } else { minarad = thescene.cusize / ar; maxarad = 64.0 * minarad; /* heuristic */ - if (maxarad > thescene.cusize*0.5) - maxarad = thescene.cusize*0.5; + if (maxarad > thescene.cusize*0.2) + maxarad = thescene.cusize*0.2; } if (minarad <= FTINY) minarad = 10.0*FTINY; @@ -263,7 +263,7 @@ ambnotify( /* record new modifier */ /************ THE FOLLOWING ROUTINES DIFFER BETWEEN NEW & OLD ***************/ -#ifdef NEWAMB +#ifndef OLDAMB #define tfunc(lwr, x, upr) (((x)-(lwr))/((upr)-(lwr))) @@ -1194,8 +1194,8 @@ sortambvals( /* resort ambient values */ if (i_avlist < nambvals) error(CONSISTENCY, "missing ambient values in sortambvals"); #endif - qsort((char *)avlist1, nambvals, sizeof(struct avl), &alatcmp); - qsort((char *)avlist2, nambvals, sizeof(AMBVAL *), &aposcmp); + qsort((char *)avlist1, nambvals, sizeof(struct avl), alatcmp); + qsort((char *)avlist2, nambvals, sizeof(AMBVAL *), aposcmp); for (i = 0; i < nambvals; i++) { if (avlist1[i].p == NULL) continue;