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

Comparing ray/src/rt/aniso.c (file contents):
Revision 2.50 by greg, Wed Oct 13 15:29:02 2010 UTC vs.
Revision 2.53 by greg, Sat Jun 9 07:16:47 2012 UTC

# Line 277 | Line 277 | m_aniso(                       /* shade ray that hit something anisotropic
277  
278          if (nd.rdiff > FTINY) {         /* ambient from this side */
279                  copycolor(ctmp, nd.mcolor);     /* modified by material color */
280 <                if (nd.specfl & SP_RBLT)
281 <                        scalecolor(ctmp, 1.0-nd.trans);
282 <                else
283 <                        scalecolor(ctmp, nd.rdiff);
280 >                scalecolor(ctmp, nd.rdiff);
281 >                if (nd.specfl & SP_RBLT)        /* add in specular as well? */
282 >                        addcolor(ctmp, nd.scolor);
283                  multambient(ctmp, r, nd.pnorm);
284                  addcolor(r->rcol, ctmp);        /* add to returned color */
285          }
# Line 326 | Line 325 | getacoords(            /* set up coordinate system */
325                  np->specfl |= SP_BADU;
326                  return;
327          }
328 <        if (mf->f != &unitxf)
329 <                multv3(np->u, np->u, mf->f->xfm);
328 >        if (mf->fxp != &unitxf)
329 >                multv3(np->u, np->u, mf->fxp->xfm);
330          fcross(np->v, np->pnorm, np->u);
331          if (normalize(np->v) == 0.0) {
332                  objerror(np->mp, WARNING, "illegal orientation vector");
# Line 367 | Line 366 | agaussamp(             /* sample anisotropic Gaussian specular */
366                                  nstarget = 1;
367                  }
368                  setcolor(scol, 0., 0., 0.);
369 <                dimlist[ndims++] = (int)np->mp;
369 >                dimlist[ndims++] = (int)(size_t)np->mp;
370                  maxiter = MAXITER*nstarget;
371                  for (nstaken = ntrials = 0; nstaken < nstarget &&
372                                                  ntrials < maxiter; ntrials++) {
# Line 437 | Line 436 | agaussamp(             /* sample anisotropic Gaussian specular */
436                          } else
437                                  nstarget = 1;
438                  }
439 <                dimlist[ndims++] = (int)np->mp;
439 >                dimlist[ndims++] = (int)(size_t)np->mp;
440                  maxiter = MAXITER*nstarget;
441                  for (nstaken = ntrials = 0; nstaken < nstarget &&
442                                                  ntrials < maxiter; ntrials++) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines