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

Comparing ray/src/rt/normal.c (file contents):
Revision 2.64 by greg, Mon Jul 30 17:46:50 2012 UTC vs.
Revision 2.67 by greg, Sat May 10 17:43:01 2014 UTC

# Line 188 | Line 188 | m_normal(                      /* color a ray that hit something normal *
188                  objerror(m, USER, "bad number of arguments");
189                                                  /* check for back side */
190          if (r->rod < 0.0) {
191 <                if (!backvis && m->otype != MAT_TRANS) {
191 >                if (!backvis) {
192                          raytrans(r);
193                          return(1);
194                  }
# Line 239 | Line 239 | m_normal(                      /* color a ray that hit something normal *
239                          if (!(nd.specfl & SP_PURE) &&
240                                          specthresh >= nd.tspec-FTINY)
241                                  nd.specfl |= SP_TBLT;
242 <                        if (!hastexture || r->crtype & SHADOW) {
242 >                        if (!hastexture || r->crtype & (SHADOW|AMBIENT)) {
243                                  VCOPY(nd.prdir, r->rdir);
244                                  transtest = 2;
245                          } else {
# Line 282 | Line 282 | m_normal(                      /* color a ray that hit something normal *
282                  } else if (fest > FTINY) {
283                          d = m->oargs.farg[3]*(1. - fest);
284                          for (i = 0; i < 3; i++)
285 <                                nd.scolor[i] = fest + nd.mcolor[i]*d;
285 >                                colval(nd.scolor,i) = fest +
286 >                                                colval(nd.mcolor,i)*d;
287                  } else {
288                          copycolor(nd.scolor, nd.mcolor);
289                          scalecolor(nd.scolor, nd.rspec);
# Line 305 | Line 306 | m_normal(                      /* color a ray that hit something normal *
306                          rayvalue(&lr);
307                          multcolor(lr.rcol, lr.rcoef);
308                          addcolor(r->rcol, lr.rcol);
309 <                        if (!hastexture && nd.specfl & SP_FLAT) {
309 >                        if (nd.specfl & SP_FLAT &&
310 >                                        !hastexture | (r->crtype & AMBIENT)) {
311                                  mirtest = 2.*bright(lr.rcol);
312                                  mirdist = r->rot + lr.rt;
313                          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines