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.13 by greg, Wed Jul 10 09:35:26 1991 UTC vs.
Revision 2.1 by greg, Tue Nov 12 17:09:08 1991 UTC

# Line 246 | Line 246 | register RAY  *r;
246                                  break;
247                  if (i-3 != nd.dp->nd)
248                          objerror(m, USER, "dimension error");
249 <                if (!fundefined(m->oargs.sarg[3]))
250 <                        loadfunc(m->oargs.sarg[2]);
249 >                funcfile(m->oargs.sarg[2]);
250          } else if (m->otype == MAT_BRTDF) {
251                  nd.dp = NULL;
252 <                if (!fundefined(m->oargs.sarg[7]))
254 <                        loadfunc(m->oargs.sarg[9]);
252 >                funcfile(m->oargs.sarg[9]);
253          } else {
254                  nd.dp = NULL;
255 <                if (!fundefined(m->oargs.sarg[0]))
258 <                        loadfunc(m->oargs.sarg[1]);
255 >                funcfile(m->oargs.sarg[1]);
256          }
257                                                  /* set special variables */
258          setbrdfunc(&nd);
# Line 267 | Line 264 | register RAY  *r;
264                  setcolor(ctmp, varvalue(m->oargs.sarg[3]),
265                                  varvalue(m->oargs.sarg[4]),
266                                  varvalue(m->oargs.sarg[5]));
267 <                scalecolor(ctmp, nd.tspec);
267 >                scalecolor(ctmp, nd.trans);
268                  if (errno)
269                          objerror(m, WARNING, "compute error");
270                  else if ((tspect = bright(ctmp)) > FTINY &&
271                                  rayorigin(&sr, r, TRANS, tspect) == 0) {
272 <                        if (DOT(r->pert,r->pert) > FTINY*FTINY) {
272 >                        if (!(r->crtype & SHADOW) &&
273 >                                        DOT(r->pert,r->pert) > FTINY*FTINY) {
274                                  for (i = 0; i < 3; i++) /* perturb direction */
275                                          sr.rdir[i] = r->rdir[i] -
276                                                          .75*r->pert[i];
# Line 298 | Line 296 | register RAY  *r;
296                  setcolor(ctmp, varvalue(m->oargs.sarg[0]),
297                                  varvalue(m->oargs.sarg[1]),
298                                  varvalue(m->oargs.sarg[2]));
301                scalecolor(ctmp, nd.rspec);
299                  if (errno)
300                          objerror(m, WARNING, "compute error");
301                  else if ((rspecr = bright(ctmp)) > FTINY &&

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines