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.16 by greg, Tue Feb 25 02:47:22 2003 UTC vs.
Revision 2.17 by greg, Mon Mar 3 00:10:51 2003 UTC

# Line 224 | Line 224 | register RAY  *r;
224          setcolor(nd.tdiff, m->oargs.farg[6],
225                          m->oargs.farg[7],
226                          m->oargs.farg[8]);
227 <                                        /* get modifiers */
227 >                                                /* get modifiers */
228          raytexture(r, m->omod);
229          nd.pdot = raynormal(nd.pnorm, r);       /* perturb normal */
230          if (r->rod < 0.0) {                     /* orient perturbed values */
# Line 338 | Line 338 | register RAY  *r;
338          if (m->oargs.nsargs < (hasdata(m->otype)?4:2) | m->oargs.nfargs <
339                          (m->otype==MAT_TFUNC|m->otype==MAT_TDATA?6:4))
340                  objerror(m, USER, "bad # arguments");
341 +                                                /* check for back side */
342 +        if (r->rod < 0.0) {
343 +                if (!backvis && m->otype != MAT_TFUNC
344 +                                && m->otype != MAT_TDATA) {
345 +                        raytrans(r);
346 +                        return(1);
347 +                }
348 +                raytexture(r, m->omod);
349 +                flipsurface(r);                 /* reorient if backvis */
350 +        } else
351 +                raytexture(r, m->omod);
352 +
353          nd.mp = m;
354          nd.pr = r;
355                                                  /* get material color */
# Line 359 | Line 371 | register RAY  *r;
371                                                  /* compute reflectance */
372          dtmp = 1.0 - nd.trans - nd.rspec;
373          setcolor(nd.rdiff, dtmp, dtmp, dtmp);
362                                                /* check for back side */
363        if (r->rod < 0.0) {
364                if (!backvis && m->otype != MAT_TFUNC
365                                && m->otype != MAT_TDATA) {
366                        raytrans(r);
367                        return(1);
368                }
369                flipsurface(r);                 /* reorient if backvis */
370        }
371                                                /* get modifiers */
372        raytexture(r, m->omod);
374          nd.pdot = raynormal(nd.pnorm, r);       /* perturb normal */
375          multcolor(nd.mcolor, r->pcol);          /* modify material color */
376          multcolor(nd.rdiff, nd.mcolor);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines