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 1.10 by greg, Mon Jun 17 08:53:58 1991 UTC vs.
Revision 1.12 by greg, Fri Jun 28 10:04:02 1991 UTC

# Line 263 | Line 263 | register RAY  *r;
263          if (m->otype == MAT_BRTDF && nd.tspec > FTINY) {
264                  RAY  sr;
265                  errno = 0;
266 <                setcolor(ctmp, varvalue(m->oargs.sarg[0]),
267 <                                varvalue(m->oargs.sarg[1]),
268 <                                varvalue(m->oargs.sarg[2]));
266 >                setcolor(ctmp, varvalue(m->oargs.sarg[3]),
267 >                                varvalue(m->oargs.sarg[4]),
268 >                                varvalue(m->oargs.sarg[5]));
269                  scalecolor(ctmp, nd.tspec);
270                  if (errno)
271                          objerror(m, WARNING, "compute error");
# Line 293 | Line 293 | register RAY  *r;
293          if (m->otype == MAT_BRTDF && nd.rspec > FTINY) {
294                  RAY  sr;
295                  errno = 0;
296 <                setcolor(ctmp, varvalue(m->oargs.sarg[3]),
297 <                                varvalue(m->oargs.sarg[4]),
298 <                                varvalue(m->oargs.sarg[5]));
296 >                setcolor(ctmp, varvalue(m->oargs.sarg[0]),
297 >                                varvalue(m->oargs.sarg[1]),
298 >                                varvalue(m->oargs.sarg[2]));
299                  scalecolor(ctmp, nd.rspec);
300                  if (errno)
301                          objerror(m, WARNING, "compute error");
# Line 350 | Line 350 | register BRDFDAT  *np;
350          varset("NxP", '=', vec[0]/funcxf.sca);
351          varset("NyP", '=', vec[1]/funcxf.sca);
352          varset("NzP", '=', vec[2]/funcxf.sca);
353 <        varset("RdotP", '=', np->pdot);
353 >        varset("RdotP", '=', np->pdot <= -1.0 ? -1.0 :
354 >                        np->pdot >= 1.0 ? 1.0 : np->pdot);
355          varset("CrP", '=', colval(np->mcolor,RED));
356          varset("CgP", '=', colval(np->mcolor,GRN));
357          varset("CbP", '=', colval(np->mcolor,BLU));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines