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

Comparing ray/src/rt/m_bsdf.c (file contents):
Revision 2.4 by greg, Sat Feb 19 23:42:09 2011 UTC vs.
Revision 2.11 by greg, Wed Jun 8 15:37:46 2011 UTC

# Line 17 | Line 17 | static const char RCSid[] = "$Id$";
17   /*
18   *      Arguments to this material include optional diffuse colors.
19   *  String arguments include the BSDF and function files.
20 < *      A thickness variable causes the strange but useful behavior
21 < *  of translating transmitted rays this distance past the surface
22 < *  intersection in the normal direction to bypass intervening geometry.
23 < *  This only affects scattered, non-source directed samples.  Thus,
24 < *  thickness is relevant only if there is a transmitted component.
25 < *  A positive thickness has the further side-effect that an unscattered
20 > *      A non-zero thickness causes the strange but useful behavior
21 > *  of translating transmitted rays this distance beneath the surface
22 > *  (opposite the surface normal) to bypass any intervening geometry.
23 > *  Translation only affects scattered, non-source-directed samples.
24 > *  A non-zero thickness has the further side-effect that an unscattered
25   *  (view) ray will pass right through our material if it has any
26 < *  non-diffuse transmission, making our BSDF invisible.  This allows the
27 < *  underlying geometry to become visible.  A matching surface should be
28 < *  placed on the other side, less than the thickness away, if the backside
29 < *  reflectance is non-zero.
26 > *  non-diffuse transmission, making the BSDF surface invisible.  This
27 > *  shows the proxied geometry instead. Thickness has the further
28 > *  effect of turning off reflection on the hidden side so that rays
29 > *  heading in the opposite direction pass unimpeded through the BSDF
30 > *  surface.  A paired surface may be placed on the opposide side of
31 > *  the detail geometry, less than this thickness away, if a two-way
32 > *  proxy is desired.  Note that the sign of the thickness is important.
33 > *  A positive thickness hides geometry behind the BSDF surface and uses
34 > *  front reflectance and transmission properties.  A negative thickness
35 > *  hides geometry in front of the surface when rays hit from behind,
36 > *  and applies only the transmission and backside reflectance properties.
37 > *  Reflection is ignored on the hidden side, as those rays pass through.
38   *      The "up" vector for the BSDF is given by three variables, defined
39   *  (along with the thickness) by the named function file, or '.' if none.
40   *  Together with the surface normal, this defines the local coordinate
41   *  system for the BSDF.
42   *      We do not reorient the surface, so if the BSDF has no back-side
43 < *  reflectance and none is given in the real arguments, the surface will
44 < *  appear as black when viewed from behind (unless backvis is false).
45 < *  The diffuse compnent arguments are added to components in the BSDF file,
43 > *  reflectance and none is given in the real arguments, a BSDF surface
44 > *  with zero thickness will appear black when viewed from behind
45 > *  unless backface visibility is off.
46 > *      The diffuse arguments are added to components in the BSDF file,
47   *  not multiplied.  However, patterns affect this material as a multiplier
48   *  on everything except non-diffuse reflection.
49   *
50   *  Arguments for MAT_BSDF are:
51   *      6+      thick   BSDFfile        ux uy uz        funcfile        transform
52   *      0
53 < *      0|3|9   rdf     gdf     bdf
53 > *      0|3|6|9 rdf     gdf     bdf
54   *              rdb     gdb     bdb
55   *              rdt     gdt     bdt
56   */
# Line 59 | Line 67 | typedef struct {
67          RAY     *pr;            /* intersected ray */
68          FVECT   pnorm;          /* perturbed surface normal */
69          FVECT   vray;           /* local outgoing (return) vector */
70 <        double  sr_vpsa;        /* sqrt of BSDF projected solid angle */
70 >        double  sr_vpsa[2];     /* sqrt of BSDF projected solid angle extrema */
71 >        double  thru_psa;       /* through direction projected solid angle */
72          RREAL   toloc[3][3];    /* world to local BSDF coords */
73          RREAL   fromloc[3][3];  /* local BSDF coords to world */
74          double  thick;          /* surface thickness */
# Line 74 | Line 83 | typedef struct {
83  
84   /* Jitter ray sample according to projected solid angle and specjitter */
85   static void
86 < bsdf_jitter(FVECT vres, BSDFDAT *ndp)
86 > bsdf_jitter(FVECT vres, BSDFDAT *ndp, int domax)
87   {
88 <        double  sr_psa = ndp->sr_vpsa;
88 >        double  sr_psa = ndp->sr_vpsa[domax];
89  
90          VCOPY(vres, ndp->vray);
91          if (specjitter < 1.)
# Line 88 | Line 97 | bsdf_jitter(FVECT vres, BSDFDAT *ndp)
97          normalize(vres);
98   }
99  
100 < /* Compute source contribution for BSDF */
100 > /* Evaluate BSDF for direct component, returning true if OK to proceed */
101 > static int
102 > direct_bsdf_OK(COLOR cval, FVECT ldir, BSDFDAT *ndp)
103 > {
104 >        FVECT   vsrc, vjit;
105 >        SDValue sv;
106 >        SDError ec;
107 >                                        /* transform source direction */
108 >        if (SDmapDir(vsrc, ndp->toloc, ldir) != SDEnone)
109 >                return(0);
110 >                                        /* jitter query direction */
111 >        bsdf_jitter(vjit, ndp, 0);
112 >                                        /* avoid indirect over-counting */
113 >        if (ndp->thick != 0 && ndp->pr->crtype & (SPECULAR|AMBIENT) &&
114 >                                vsrc[2] > 0 ^ vjit[2] > 0) {
115 >                double  dx = vsrc[0] + vjit[0];
116 >                double  dy = vsrc[1] + vjit[1];
117 >                if (dx*dx + dy*dy <= ndp->thru_psa)
118 >                        return(0);
119 >        }
120 >        ec = SDevalBSDF(&sv, vjit, vsrc, ndp->sd);
121 >        if (ec)
122 >                objerror(ndp->mp, USER, transSDError(ec));
123 >
124 >        if (sv.cieY <= FTINY)           /* not worth using? */
125 >                return(0);
126 >                                        /* else we're good to go */
127 >        cvt_sdcolor(cval, &sv);
128 >        return(1);
129 > }
130 >
131 > /* Compute source contribution for BSDF (reflected & transmitted) */
132   static void
133 < dirbsdf(
133 > dir_bsdf(
134          COLOR  cval,                    /* returned coefficient */
135          void  *nnp,                     /* material data */
136          FVECT  ldir,                    /* light source direction */
# Line 98 | Line 138 | dirbsdf(
138   )
139   {
140          BSDFDAT         *np = (BSDFDAT *)nnp;
101        SDError         ec;
102        SDValue         sv;
103        FVECT           vsrc;
104        FVECT           vjit;
141          double          ldot;
142          double          dtmp;
143          COLOR           ctmp;
# Line 112 | Line 148 | dirbsdf(
148          if ((-FTINY <= ldot) & (ldot <= FTINY))
149                  return;
150  
151 <        if (ldot > .0 && bright(np->rdiff) > FTINY) {
151 >        if (ldot > 0 && bright(np->rdiff) > FTINY) {
152                  /*
153                   *  Compute added diffuse reflected component.
154                   */
# Line 121 | Line 157 | dirbsdf(
157                  scalecolor(ctmp, dtmp);
158                  addcolor(cval, ctmp);
159          }
160 <        if (ldot < .0 && bright(np->tdiff) > FTINY) {
160 >        if (ldot < 0 && bright(np->tdiff) > FTINY) {
161                  /*
162                   *  Compute added diffuse transmission.
163                   */
# Line 133 | Line 169 | dirbsdf(
169          /*
170           *  Compute scattering coefficient using BSDF.
171           */
172 <        if (SDmapDir(vsrc, np->toloc, ldir) != SDEnone)
172 >        if (!direct_bsdf_OK(ctmp, ldir, np))
173                  return;
174 <        bsdf_jitter(vjit, np);
139 <        ec = SDevalBSDF(&sv, vjit, vsrc, np->sd);
140 <        if (ec)
141 <                objerror(np->mp, USER, transSDError(ec));
142 <
143 <        if (sv.cieY <= FTINY)           /* not worth using? */
144 <                return;
145 <        cvt_sdcolor(ctmp, &sv);
146 <        if (ldot > .0) {                /* pattern only diffuse reflection */
174 >        if (ldot > 0) {         /* pattern only diffuse reflection */
175                  COLOR   ctmp1, ctmp2;
176 <                dtmp = (np->pr->rod > .0) ? np->sd->rLambFront.cieY
176 >                dtmp = (np->pr->rod > 0) ? np->sd->rLambFront.cieY
177                                          : np->sd->rLambBack.cieY;
178 <                dtmp /= PI * sv.cieY;   /* diffuse fraction */
178 >                                        /* diffuse fraction */
179 >                dtmp /= PI * bright(ctmp);
180                  copycolor(ctmp2, np->pr->pcol);
181                  scalecolor(ctmp2, dtmp);
182                  setcolor(ctmp1, 1.-dtmp, 1.-dtmp, 1.-dtmp);
# Line 162 | Line 191 | dirbsdf(
191          addcolor(cval, ctmp);
192   }
193  
194 + /* Compute source contribution for BSDF (reflected only) */
195 + static void
196 + dir_brdf(
197 +        COLOR  cval,                    /* returned coefficient */
198 +        void  *nnp,                     /* material data */
199 +        FVECT  ldir,                    /* light source direction */
200 +        double  omega                   /* light source size */
201 + )
202 + {
203 +        BSDFDAT         *np = (BSDFDAT *)nnp;
204 +        double          ldot;
205 +        double          dtmp;
206 +        COLOR           ctmp, ctmp1, ctmp2;
207 +
208 +        setcolor(cval, .0, .0, .0);
209 +
210 +        ldot = DOT(np->pnorm, ldir);
211 +        
212 +        if (ldot <= FTINY)
213 +                return;
214 +
215 +        if (bright(np->rdiff) > FTINY) {
216 +                /*
217 +                 *  Compute added diffuse reflected component.
218 +                 */
219 +                copycolor(ctmp, np->rdiff);
220 +                dtmp = ldot * omega * (1./PI);
221 +                scalecolor(ctmp, dtmp);
222 +                addcolor(cval, ctmp);
223 +        }
224 +        /*
225 +         *  Compute reflection coefficient using BSDF.
226 +         */
227 +        if (!direct_bsdf_OK(ctmp, ldir, np))
228 +                return;
229 +                                        /* pattern only diffuse reflection */
230 +        dtmp = (np->pr->rod > 0) ? np->sd->rLambFront.cieY
231 +                                : np->sd->rLambBack.cieY;
232 +        dtmp /= PI * bright(ctmp);      /* diffuse fraction */
233 +        copycolor(ctmp2, np->pr->pcol);
234 +        scalecolor(ctmp2, dtmp);
235 +        setcolor(ctmp1, 1.-dtmp, 1.-dtmp, 1.-dtmp);
236 +        addcolor(ctmp1, ctmp2);
237 +        multcolor(ctmp, ctmp1);         /* apply derated pattern */
238 +        dtmp = ldot * omega;
239 +        scalecolor(ctmp, dtmp);
240 +        addcolor(cval, ctmp);
241 + }
242 +
243 + /* Compute source contribution for BSDF (transmitted only) */
244 + static void
245 + dir_btdf(
246 +        COLOR  cval,                    /* returned coefficient */
247 +        void  *nnp,                     /* material data */
248 +        FVECT  ldir,                    /* light source direction */
249 +        double  omega                   /* light source size */
250 + )
251 + {
252 +        BSDFDAT         *np = (BSDFDAT *)nnp;
253 +        double          ldot;
254 +        double          dtmp;
255 +        COLOR           ctmp;
256 +
257 +        setcolor(cval, .0, .0, .0);
258 +
259 +        ldot = DOT(np->pnorm, ldir);
260 +
261 +        if (ldot >= -FTINY)
262 +                return;
263 +
264 +        if (bright(np->tdiff) > FTINY) {
265 +                /*
266 +                 *  Compute added diffuse transmission.
267 +                 */
268 +                copycolor(ctmp, np->tdiff);
269 +                dtmp = -ldot * omega * (1.0/PI);
270 +                scalecolor(ctmp, dtmp);
271 +                addcolor(cval, ctmp);
272 +        }
273 +        /*
274 +         *  Compute scattering coefficient using BSDF.
275 +         */
276 +        if (!direct_bsdf_OK(ctmp, ldir, np))
277 +                return;
278 +                                        /* full pattern on transmission */
279 +        multcolor(ctmp, np->pr->pcol);
280 +        dtmp = -ldot * omega;
281 +        scalecolor(ctmp, dtmp);
282 +        addcolor(cval, ctmp);
283 + }
284 +
285   /* Sample separate BSDF component */
286   static int
287   sample_sdcomp(BSDFDAT *ndp, SDComponent *dcp, int usepat)
288   {
289          int     nstarget = 1;
290 <        int     nsent = 0;
290 >        int     nsent;
291          SDError ec;
292          SDValue bsv;
293 <        double  sthick;
294 <        FVECT   vjit, vsmp;
293 >        double  xrand;
294 >        FVECT   vsmp;
295          RAY     sr;
176        int     ntrials;
296                                                  /* multiple samples? */
297          if (specjitter > 1.5) {
298                  nstarget = specjitter*ndp->pr->rweight + .5;
299                  if (nstarget < 1)
300                          nstarget = 1;
301          }
302 <                                                /* run through our trials */
303 <        for (ntrials = 0; nsent < nstarget && ntrials < 9*nstarget; ntrials++) {
304 <                SDerrorDetail[0] = '\0';
305 <                                                /* sample direction & coef. */
306 <                bsdf_jitter(vjit, ndp);
307 <                ec = SDsampComponent(&bsv, vsmp, vjit, ntrials ? frandom()
308 <                                : urand(ilhash(dimlist,ndims)+samplendx), dcp);
302 >                                                /* run through our samples */
303 >        for (nsent = 0; nsent < nstarget; nsent++) {
304 >                if (nstarget == 1)              /* stratify random variable */
305 >                        xrand = urand(ilhash(dimlist,ndims)+samplendx);
306 >                else
307 >                        xrand = (nsent + frandom())/(double)nstarget;
308 >                SDerrorDetail[0] = '\0';        /* sample direction & coef. */
309 >                bsdf_jitter(vsmp, ndp, 0);
310 >                ec = SDsampComponent(&bsv, vsmp, xrand, dcp);
311                  if (ec)
312                          objerror(ndp->mp, USER, transSDError(ec));
313 <                                                /* zero component? */
193 <                if (bsv.cieY <= FTINY)
313 >                if (bsv.cieY <= FTINY)          /* zero component? */
314                          break;
315                                                  /* map vector to world */
316                  if (SDmapDir(sr.rdir, ndp->fromloc, vsmp) != SDEnone)
317                          break;
198                                                /* unintentional penetration? */
199                if (DOT(sr.rdir, ndp->pr->ron) > .0 ^ vsmp[2] > .0)
200                        continue;
318                                                  /* spawn a specular ray */
319                  if (nstarget > 1)
320                          bsv.cieY /= (double)nstarget;
321 <                cvt_sdcolor(sr.rcoef, &bsv);    /* use color */
322 <                if (usepat)                     /* pattern on transmission */
321 >                cvt_sdcolor(sr.rcoef, &bsv);    /* use sample color */
322 >                if (usepat)                     /* apply pattern? */
323                          multcolor(sr.rcoef, ndp->pr->pcol);
324                  if (rayorigin(&sr, SPECULAR, ndp->pr, sr.rcoef) < 0) {
325 <                        if (maxdepth  > 0)
325 >                        if (maxdepth > 0)
326                                  break;
327 <                        ++nsent;                /* Russian roulette victim */
211 <                        continue;
327 >                        continue;               /* Russian roulette victim */
328                  }
329 <                if (ndp->thick > FTINY) {       /* need to move origin? */
330 <                        sthick = (ndp->pr->rod > .0) ? -ndp->thick : ndp->thick;
331 <                        if (sthick < .0 ^ vsmp[2] > .0)
216 <                                VSUM(sr.rorg, sr.rorg, ndp->pr->ron, sthick);
217 <                }
329 >                                                /* need to offset origin? */
330 >                if (ndp->thick != 0 && ndp->pr->rod > 0 ^ vsmp[2] > 0)
331 >                        VSUM(sr.rorg, sr.rorg, ndp->pr->ron, -ndp->thick);
332                  rayvalue(&sr);                  /* send & evaluate sample */
333                  multcolor(sr.rcol, sr.rcoef);
334                  addcolor(ndp->pr->rcol, sr.rcol);
221                ++nsent;
335          }
336          return(nsent);
337   }
# Line 237 | Line 350 | sample_sdf(BSDFDAT *ndp, int sflags)
350                  cvt_sdcolor(unsc, &ndp->sd->tLamb);
351          } else /* sflags == SDsampSpR */ {
352                  unsc = ndp->runsamp;
353 <                if (ndp->pr->rod > .0) {
353 >                if (ndp->pr->rod > 0) {
354                          dfp = ndp->sd->rf;
355                          cvt_sdcolor(unsc, &ndp->sd->rLambFront);
356                  } else {
# Line 254 | Line 367 | sample_sdf(BSDFDAT *ndp, int sflags)
367                          FVECT   vjit;
368                          double  d;
369                          COLOR   ctmp;
370 <                        bsdf_jitter(vjit, ndp);
370 >                        bsdf_jitter(vjit, ndp, 1);
371                          d = SDdirectHemi(vjit, sflags, ndp->sd);
372                          if (sflags == SDsampSpT) {
373                                  copycolor(ctmp, ndp->pr->pcol);
# Line 280 | Line 393 | sample_sdf(BSDFDAT *ndp, int sflags)
393   int
394   m_bsdf(OBJREC *m, RAY *r)
395   {
396 +        int     hitfront;
397          COLOR   ctmp;
398          SDError ec;
399 <        FVECT   upvec, outVec;
399 >        FVECT   upvec, vtmp;
400          MFUNC   *mf;
401          BSDFDAT nd;
402                                                  /* check arguments */
403          if ((m->oargs.nsargs < 6) | (m->oargs.nfargs > 9) |
404                                  (m->oargs.nfargs % 3))
405                  objerror(m, USER, "bad # arguments");
406 <
407 <                                                /* get BSDF data */
294 <        nd.sd = loadBSDF(m->oargs.sarg[1]);
406 >                                                /* record surface struck */
407 >        hitfront = (r->rod > 0);
408                                                  /* load cal file */
409          mf = getfunc(m, 5, 0x1d, 1);
410                                                  /* get thickness */
411          nd.thick = evalue(mf->ep[0]);
412 <        if (nd.thick < .0)
412 >        if ((-FTINY <= nd.thick) & (nd.thick <= FTINY))
413                  nd.thick = .0;
414                                                  /* check shadow */
415          if (r->crtype & SHADOW) {
416 <                if ((nd.thick > FTINY) & (nd.sd->tf != NULL))
416 >                if (nd.thick != 0)
417                          raytrans(r);            /* pass-through */
418 <                SDfreeCache(nd.sd);
306 <                return(1);                      /* else shadow */
418 >                return(1);                      /* or shadow */
419          }
420 <                                                /* check unscattered ray */
421 <        if (!(r->crtype & (SPECULAR|AMBIENT)) &&
422 <                        (nd.thick > FTINY) & (nd.sd->tf != NULL)) {
423 <                SDfreeCache(nd.sd);
312 <                raytrans(r);                    /* pass-through */
420 >                                                /* check other rays to pass */
421 >        if (nd.thick != 0 && (!(r->crtype & (SPECULAR|AMBIENT)) ||
422 >                                nd.thick > 0 ^ hitfront)) {
423 >                raytrans(r);                    /* hide our proxy */
424                  return(1);
425          }
426 +                                                /* get BSDF data */
427 +        nd.sd = loadBSDF(m->oargs.sarg[1]);
428                                                  /* diffuse reflectance */
429 <        if (r->rod > .0) {
429 >        if (hitfront) {
430                  if (m->oargs.nfargs < 3)
431                          setcolor(nd.rdiff, .0, .0, .0);
432                  else
# Line 345 | Line 458 | m_bsdf(OBJREC *m, RAY *r)
458          nd.pr = r;
459                                                  /* get modifiers */
460          raytexture(r, m->omod);
348        if (bright(r->pcol) <= FTINY) {         /* black pattern?! */
349                SDfreeCache(nd.sd);
350                return(1);
351        }
461                                                  /* modify diffuse values */
462          multcolor(nd.rdiff, r->pcol);
463          multcolor(nd.tdiff, r->pcol);
# Line 374 | Line 483 | m_bsdf(OBJREC *m, RAY *r)
483                  ec = SDinvXform(nd.fromloc, nd.toloc);
484                                                  /* determine BSDF resolution */
485          if (!ec)
486 <                ec = SDsizeBSDF(&nd.sr_vpsa, nd.vray, SDqueryMin, nd.sd);
487 <        if (!ec)
488 <                nd.sr_vpsa = sqrt(nd.sr_vpsa);
489 <        else {
486 >                ec = SDsizeBSDF(nd.sr_vpsa, nd.vray, NULL,
487 >                                                SDqueryMin+SDqueryMax, nd.sd);
488 >        nd.thru_psa = .0;
489 >        if (!ec && nd.thick != 0 && r->crtype & (SPECULAR|AMBIENT)) {
490 >                FVECT   vthru;
491 >                vthru[0] = -nd.vray[0];
492 >                vthru[1] = -nd.vray[1];
493 >                vthru[2] = -nd.vray[2];
494 >                ec = SDsizeBSDF(&nd.thru_psa, nd.vray, vthru,
495 >                                                SDqueryMin, nd.sd);
496 >        }
497 >        if (ec) {
498                  objerror(m, WARNING, transSDError(ec));
499                  SDfreeCache(nd.sd);
500                  return(1);
501          }
502 <        
503 <        if (r->rod < .0) {                      /* perturb normal towards hit */
502 >        nd.sr_vpsa[0] = sqrt(nd.sr_vpsa[0]);
503 >        nd.sr_vpsa[1] = sqrt(nd.sr_vpsa[1]);
504 >        if (!hitfront) {                        /* perturb normal towards hit */
505                  nd.pnorm[0] = -nd.pnorm[0];
506                  nd.pnorm[1] = -nd.pnorm[1];
507                  nd.pnorm[2] = -nd.pnorm[2];
# Line 395 | Line 513 | m_bsdf(OBJREC *m, RAY *r)
513                                                  /* compute indirect diffuse */
514          copycolor(ctmp, nd.rdiff);
515          addcolor(ctmp, nd.runsamp);
516 <        if (bright(ctmp) > FTINY) {             /* ambient from this side */
517 <                if (r->rod < .0)
516 >        if (bright(ctmp) > FTINY) {             /* ambient from reflection */
517 >                if (!hitfront)
518                          flipsurface(r);
519                  multambient(ctmp, r, nd.pnorm);
520                  addcolor(r->rcol, ctmp);
521 <                if (r->rod < .0)
521 >                if (!hitfront)
522                          flipsurface(r);
523          }
524          copycolor(ctmp, nd.tdiff);
525          addcolor(ctmp, nd.tunsamp);
526          if (bright(ctmp) > FTINY) {             /* ambient from other side */
527                  FVECT  bnorm;
528 <                if (r->rod > .0)
528 >                if (hitfront)
529                          flipsurface(r);
530                  bnorm[0] = -nd.pnorm[0];
531                  bnorm[1] = -nd.pnorm[1];
532                  bnorm[2] = -nd.pnorm[2];
533 <                multambient(ctmp, r, bnorm);
533 >                if (nd.thick != 0) {            /* proxy with offset? */
534 >                        VCOPY(vtmp, r->rop);
535 >                        VSUM(r->rop, vtmp, r->ron, -nd.thick);
536 >                        multambient(ctmp, r, bnorm);
537 >                        VCOPY(r->rop, vtmp);
538 >                } else
539 >                        multambient(ctmp, r, bnorm);
540                  addcolor(r->rcol, ctmp);
541 <                if (r->rod > .0)
541 >                if (hitfront)
542                          flipsurface(r);
543          }
544                                                  /* add direct component */
545 <        direct(r, dirbsdf, &nd);
545 >        if ((bright(nd.tdiff) <= FTINY) & (nd.sd->tf == NULL)) {
546 >                direct(r, dir_brdf, &nd);       /* reflection only */
547 >        } else if (nd.thick == 0) {
548 >                direct(r, dir_bsdf, &nd);       /* thin surface scattering */
549 >        } else {
550 >                direct(r, dir_brdf, &nd);       /* reflection first */
551 >                VCOPY(vtmp, r->rop);            /* offset for transmitted */
552 >                VSUM(r->rop, vtmp, r->ron, -nd.thick);
553 >                direct(r, dir_btdf, &nd);       /* separate transmission */
554 >                VCOPY(r->rop, vtmp);
555 >        }
556                                                  /* clean up */
557          SDfreeCache(nd.sd);
558          return(1);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines