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.40 by greg, Wed Nov 15 18:02:52 2023 UTC vs.
Revision 2.41 by greg, Fri Apr 5 01:10:26 2024 UTC

# Line 315 | Line 315 | m_brdf(                        /* color a ray that hit a BRDTfunc material
315          }
316                                                  /* compute ambient */
317          if (hasrefl) {
318                if (!hitfront)
319                        flipsurface(r);
318                  copyscolor(sctmp, nd.rdiff);
319                  multambient(sctmp, r, nd.pnorm);
320                  saddscolor(r->rcol, sctmp);     /* add to returned color */
323                if (!hitfront)
324                        flipsurface(r);
321          }
322          if (hastrans) {                         /* from other side */
327                if (hitfront)
328                        flipsurface(r);
323                  vtmp[0] = -nd.pnorm[0];
324                  vtmp[1] = -nd.pnorm[1];
325                  vtmp[2] = -nd.pnorm[2];
326                  copyscolor(sctmp, nd.tdiff);
327                  multambient(sctmp, r, vtmp);
328                  saddscolor(r->rcol, sctmp);
335                if (hitfront)
336                        flipsurface(r);
329          }
330          if (hasrefl | hastrans || m->oargs.sarg[6][0] != '0')
331                  direct(r, dirbrdf, &nd);        /* add direct component */
# Line 412 | Line 404 | m_brdf2(                       /* color a ray that hit a BRDF material */
404                  saddscolor(r->rcol, sctmp);     /* add to returned color */
405          }
406          if (nd.trans > FTINY) {                 /* from other side */
415                flipsurface(r);
407                  vtmp[0] = -nd.pnorm[0];
408                  vtmp[1] = -nd.pnorm[1];
409                  vtmp[2] = -nd.pnorm[2];
# Line 420 | Line 411 | m_brdf2(                       /* color a ray that hit a BRDF material */
411                  scalescolor(sctmp, nd.trans);
412                  multambient(sctmp, r, vtmp);
413                  saddscolor(r->rcol, sctmp);
423                flipsurface(r);
414          }
415                                                  /* add direct component */
416          direct(r, dirbrdf, &nd);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines