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

Comparing ray/src/rt/m_brdf.c (file contents):
Revision 2.36 by greg, Tue Nov 13 19:58:33 2018 UTC vs.
Revision 2.37 by greg, Fri Nov 30 18:43:57 2018 UTC

# Line 407 | Line 407 | m_brdf2(                       /* color a ray that hit a BRDF material */
407                  multambient(ctmp, r, nd.pnorm);
408                  addcolor(r->rcol, ctmp);        /* add to returned color */
409          }
410 <        if (nd.trans > FTINY) {         /* from other side */
410 >        if (nd.trans > FTINY) {                 /* from other side */
411                  flipsurface(r);
412                  vtmp[0] = -nd.pnorm[0];
413                  vtmp[1] = -nd.pnorm[1];
# Line 436 | Line 436 | setbrdfunc(                    /* set up brdf function and variables */
436                  return(0);      /* it's OK, setfunc says we're done */
437                                  /* else (re)assign special variables */
438          multv3(vec, np->pnorm, funcxf.xfm);
439 <        varset("NxP", '=', vec[0]/funcxf.sca);
440 <        varset("NyP", '=', vec[1]/funcxf.sca);
441 <        varset("NzP", '=', vec[2]/funcxf.sca);
442 <        varset("RdotP", '=', np->pdot <= -1.0 ? -1.0 :
439 >        varset("NxP`", '=', vec[0]/funcxf.sca);
440 >        varset("NyP`", '=', vec[1]/funcxf.sca);
441 >        varset("NzP`", '=', vec[2]/funcxf.sca);
442 >        varset("RdotP`", '=', np->pdot <= -1.0 ? -1.0 :
443                          np->pdot >= 1.0 ? 1.0 : np->pdot);
444          varset("CrP", '=', colval(np->mcolor,RED));
445          varset("CgP", '=', colval(np->mcolor,GRN));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines