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

Comparing ray/src/rt/m_wgmdf.c (file contents):
Revision 2.7 by greg, Wed Dec 18 18:34:13 2024 UTC vs.
Revision 2.8 by greg, Thu Dec 19 23:25:28 2024 UTC

# Line 553 | Line 553 | m_wgmdf(OBJREC *m, RAY *r)
553                  return(1);              /* second shadow test */
554          set_dcomp(&wd, 1);
555          set_scomp(&wd, 0);
556 <        wd.specfl |= SP_FLAT*(r->ro != NULL && isflat(r->ro->otype));
556 >        wd.specfl |= SP_FLAT*(!wd.rs.mo.hastexture &&
557 >                                r->ro != NULL && isflat(r->ro->otype));
558                                          /* apply Fresnel adjustments? */
559          if (wd.specfl & SP_RPURE && pbright(wd.rs.scol) >= FRESTHRESH) {
560                  const double    fest = FRESNE(fabs(wd.rs.mo.pdot));
# Line 612 | Line 613 | m_wgmdf(OBJREC *m, RAY *r)
613                  copyscolor(r->mcol, lr.rcol);
614                  saddscolor(r->rcol, lr.rcol);
615                  r->rmt = r->rot;
616 <                if (wd.specfl & SP_FLAT &&
616 <                                !wd.rs.mo.hastexture | (r->crtype & AMBIENT))
616 >                if (wd.specfl & SP_FLAT && r->crtype & AMBIENT)
617                          r->rmt += raydistance(&lr);
618          }
619          if (wd.specfl & (SP_REFL|SP_TRAN))      /* specularly scattered rays */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines