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.12 by greg, Sat Jun 6 02:11:43 2009 UTC vs.
Revision 2.14 by greg, Thu Aug 29 15:37:16 2013 UTC

# Line 43 | Line 43 | m_mirror(                      /* shade mirrored ray */
43          if (m->oargs.nfargs != 3 || m->oargs.nsargs > 1)
44                  objerror(m, USER, "bad number of arguments");
45                                          /* check for substitute material */
46 <        if (m->oargs.nsargs > 0 &&
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)) {
49                  if (!strcmp(m->oargs.sarg[0], VOIDID)) {
50                          raytrans(r);
# Line 89 | Line 90 | m_mirror(                      /* shade mirrored ray */
90                          for (i = 0; i < 3; i++)
91                                  nr.rdir[i] = r->rdir[i] + 2.*r->rod*r->ron[i];
92          }
93 +        checknorm(nr.rdir);
94          rayvalue(&nr);
95          multcolor(nr.rcol, nr.rcoef);
96          addcolor(r->rcol, nr.rcol);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines