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.6 by greg, Thu May 27 15:28:01 1993 UTC vs.
Revision 2.7 by greg, Thu Aug 12 17:50:40 1993 UTC

# Line 21 | Line 21 | static char SCCSid[] = "$SunId$ LBL";
21   *  String arguments include the reflection function and files.
22   *  The BRDF is currently used just for the specular component to light
23   *  sources.  Reflectance values or data coordinates are functions
24 < *  of the direction to the light source.
24 > *  of the direction to the light source.  (Data modification functions
25 > *  are passed the source direction as args 2-4.)
26   *      We orient the surface towards the incoming ray, so a single
27   *  surface can be used to represent an infinitely thin object.
28   *
# Line 88 | Line 89 | double  omega;                 /* light source size */
89          COLOR  ctmp;
90          FVECT  ldx;
91          double  lddx[3], pt[MAXDIM];
92 +        double  vldx[4];
93          register char   **sa;
94          register int    i;
95  
# Line 153 | Line 155 | double  omega;                 /* light source size */
155          } else {
156                  for (i = 0; i < np->dp->nd; i++)
157                          pt[i] = funvalue(sa[3+i], 3, lddx);
158 <                dtmp = datavalue(np->dp, pt);
159 <                dtmp = funvalue(sa[0], 1, &dtmp);
158 >                vldx[0] = datavalue(np->dp, pt);
159 >                vldx[1] = lddx[0]; vldx[2] = lddx[1]; vldx[3] = lddx[2];
160 >                dtmp = funvalue(sa[0], 4, vldx);
161                  setcolor(ctmp, dtmp, dtmp, dtmp);
162          }
163          if (errno) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines