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.74 by rschregle, Tue Feb 23 12:42:41 2016 UTC vs.
Revision 2.75 by greg, Thu Aug 3 16:41:52 2017 UTC

# Line 331 | Line 331 | m_normal(                      /* color a ray that hit something normal *
331                                                  /* diffuse reflection */
332          nd.rdiff = 1.0 - nd.trans - nd.rspec;
333  
334 <        if (nd.specfl & SP_PURE && nd.rdiff <= FTINY && nd.tdiff <= FTINY)
334 >        if (nd.specfl & SP_PURE && nd.rdiff <= FTINY && nd.tdiff <= FTINY) {
335 >                if (mirtest > transtest+FTINY)
336 >                        r->rt = mirdist;
337 >                else if (transtest > FTINY)
338 >                        r->rt = transdist;
339                  return(1);                      /* 100% pure specular */
340 <
340 >        }
341          if (!(nd.specfl & SP_PURE))
342                  gaussamp(&nd);                  /* checks *BLT flags */
343  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines