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

Comparing ray/src/rt/aniso.c (file contents):
Revision 2.62 by greg, Wed Nov 15 18:02:52 2023 UTC vs.
Revision 2.64 by greg, Fri Apr 5 01:10:26 2024 UTC

# Line 288 | Line 288 | m_aniso(                       /* shade ray that hit something anisotropic
288          
289          if (nd.tdiff > FTINY) {         /* ambient from other side */
290                  FVECT  bnorm;
291
292                flipsurface(r);
291                  bnorm[0] = -nd.pnorm[0];
292                  bnorm[1] = -nd.pnorm[1];
293                  bnorm[2] = -nd.pnorm[2];
# Line 301 | Line 299 | m_aniso(                       /* shade ray that hit something anisotropic
299                  }
300                  multambient(sctmp, r, bnorm);
301                  saddscolor(r->rcol, sctmp);
304                flipsurface(r);
302          }
303                                          /* add direct component */
304          direct(r, diraniso, &nd);
# Line 353 | Line 350 | agaussamp(             /* sample anisotropic Gaussian specular */
350          int  i;
351                                          /* compute reflection */
352          if ((np->specfl & (SP_REFL|SP_RBLT)) == SP_REFL &&
353 <                        rayorigin(&sr, SPECULAR, np->rp, np->scolor) == 0) {
353 >                        rayorigin(&sr, RSPECULAR, np->rp, np->scolor) == 0) {
354                  nstarget = 1;
355                  if (specjitter > 1.5) { /* multiple samples? */
356                          nstarget = specjitter*np->rp->rweight + .5;
# Line 361 | Line 358 | agaussamp(             /* sample anisotropic Gaussian specular */
358                                  nstarget = sr.rweight/minweight;
359                          if (nstarget > 1) {
360                                  d = 1./nstarget;
361 <                                scalecolor(sr.rcoef, d);
361 >                                scalescolor(sr.rcoef, d);
362                                  sr.rweight *= d;
363                          } else
364                                  nstarget = 1;
# Line 424 | Line 421 | agaussamp(             /* sample anisotropic Gaussian specular */
421          copyscolor(sr.rcoef, np->mcolor);               /* modify by material color */
422          scalescolor(sr.rcoef, np->tspec);
423          if ((np->specfl & (SP_TRAN|SP_TBLT)) == SP_TRAN &&
424 <                        rayorigin(&sr, SPECULAR, np->rp, sr.rcoef) == 0) {
424 >                        rayorigin(&sr, TSPECULAR, np->rp, sr.rcoef) == 0) {
425                  nstarget = 1;
426                  if (specjitter > 1.5) { /* multiple samples? */
427                          nstarget = specjitter*np->rp->rweight + .5;
# Line 432 | Line 429 | agaussamp(             /* sample anisotropic Gaussian specular */
429                                  nstarget = sr.rweight/minweight;
430                          if (nstarget > 1) {
431                                  d = 1./nstarget;
432 <                                scalecolor(sr.rcoef, d);
432 >                                scalescolor(sr.rcoef, d);
433                                  sr.rweight *= d;
434                          } else
435                                  nstarget = 1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines