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

Comparing ray/src/rt/m_mirror.c (file contents):
Revision 2.16 by greg, Sat May 10 17:43:01 2014 UTC vs.
Revision 2.22 by greg, Tue Jan 21 21:31:58 2020 UTC

# Line 44 | Line 44 | m_mirror(                      /* shade mirrored ray */
44                  objerror(m, USER, "bad number of arguments");
45                                          /* check for substitute material */
46                                          /* but avoid double-counting */
47 <        if (m->oargs.nsargs > 0 && !(r->crtype & (AMBIENT|SPECULAR)) &&
48 <                        (r->rsrc < 0 || source[r->rsrc].so != r->ro)) {
47 >        if ( m->oargs.nsargs > 0 &&
48 >                        (r->rsrc < 0 || source[r->rsrc].so != r->ro) &&
49 >                        !(r->crtype & (AMBIENT|SPECULAR) && r->rod > 0.) ) {
50                  if (!strcmp(m->oargs.sarg[0], VOIDID)) {
51                          raytrans(r);
52                          return(1);
# Line 97 | Line 98 | m_mirror(                      /* shade mirrored ray */
98          checknorm(nr.rdir);
99          rayvalue(&nr);
100          multcolor(nr.rcol, nr.rcoef);
101 +        copycolor(r->mcol, nr.rcol);
102          addcolor(r->rcol, nr.rcol);
103 +        r->rmt = r->rot;
104          if (rpure && r->ro != NULL && isflat(r->ro->otype))
105 <                r->rt = r->rot + nr.rt;
105 >                r->rmt += raydistance(&nr);
106          return(1);
107   }
108  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines