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.42 by greg, Thu Dec 5 19:23:43 2024 UTC vs.
Revision 2.44 by greg, Wed Dec 18 17:57:06 2024 UTC

# Line 346 | Line 346 | m_brdf2(                       /* color a ray that hit a BRDF material */
346                                                  /* always a shadow */
347          if (r->crtype & SHADOW)
348                  return(1);
349                                                /* check arguments */
350        if ((m->oargs.nsargs < (hasdata(m->otype)?4:2)) | (m->oargs.nfargs <
351                        ((m->otype==MAT_TFUNC)|(m->otype==MAT_TDATA)?6:4)))
352                objerror(m, USER, "bad # arguments");
349                                                  /* check for back side */
350          if (r->rod < 0.0) {
351                  if (!backvis) {
# Line 360 | Line 356 | m_brdf2(                       /* color a ray that hit a BRDF material */
356                  flipsurface(r);                 /* reorient if backvis */
357          } else
358                  raytexture(r, m->omod);
359 +                                                /* check arguments */
360 +        if ((m->oargs.nsargs < (hasdata(m->otype)?4:2)) | (m->oargs.nfargs <
361 +                        ((m->otype==MAT_TFUNC)|(m->otype==MAT_TDATA)?6:4)))
362 +                objerror(m, USER, "bad # arguments");
363  
364          nd.mp = m;
365          nd.pr = r;
# Line 432 | Line 432 | setbrdfunc(                    /* set up brdf function and variables */
432          varset("NxP`", '=', vec[0]/funcxf.sca);
433          varset("NyP`", '=', vec[1]/funcxf.sca);
434          varset("NzP`", '=', vec[2]/funcxf.sca);
435 <        varset("RdotP`", '=', np->pdot <= -1.0 ? -1.0 :
436 <                        np->pdot >= 1.0 ? 1.0 : np->pdot);
435 >        varset("RdotP`", '=', np->pdot);
436          scolor_color(ctmp, np->mcolor);         /* should use scolor_rgb()? */
437          varset("CrP", '=', colval(ctmp,RED));
438          varset("CgP", '=', colval(ctmp,GRN));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines