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

Comparing ray/src/rt/normal.c (file contents):
Revision 2.59 by greg, Wed Oct 13 15:29:02 2010 UTC vs.
Revision 2.61 by greg, Wed Oct 26 03:44:56 2011 UTC

# Line 325 | Line 325 | m_normal(                      /* color a ray that hit something normal *
325  
326          if (nd.rdiff > FTINY) {         /* ambient from this side */
327                  copycolor(ctmp, nd.mcolor);     /* modified by material color */
328 <                if (nd.specfl & SP_RBLT)
329 <                        scalecolor(ctmp, 1.0-nd.trans);
330 <                else
331 <                        scalecolor(ctmp, nd.rdiff);
328 >                scalecolor(ctmp, nd.rdiff);
329 >                if (nd.specfl & SP_RBLT)        /* add in specular as well? */
330 >                        addcolor(ctmp, nd.scolor);
331                  multambient(ctmp, r, hastexture ? nd.pnorm : r->ron);
332                  addcolor(r->rcol, ctmp);        /* add to returned color */
333          }
# Line 405 | Line 404 | gaussamp(                      /* sample Gaussian specular */
404                                  nstarget = 1;
405                  }
406                  setcolor(scol, 0., 0., 0.);
407 <                dimlist[ndims++] = (int)np->mp;
407 >                dimlist[ndims++] = (int)(size_t)np->mp;
408                  maxiter = MAXITER*nstarget;
409                  for (nstaken = ntrials = 0; nstaken < nstarget &&
410                                                  ntrials < maxiter; ntrials++) {
# Line 469 | Line 468 | gaussamp(                      /* sample Gaussian specular */
468                          } else
469                                  nstarget = 1;
470                  }
471 <                dimlist[ndims++] = (int)np->mp;
471 >                dimlist[ndims++] = (int)(size_t)np->mp;
472                  maxiter = MAXITER*nstarget;
473                  for (nstaken = ntrials = 0; nstaken < nstarget &&
474                                                  ntrials < maxiter; ntrials++) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines