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

Comparing ray/src/rt/raytrace.c (file contents):
Revision 2.46 by greg, Thu Mar 10 22:37:00 2005 UTC vs.
Revision 2.47 by greg, Thu Apr 14 18:04:12 2005 UTC

# Line 162 | Line 162 | rayshade(              /* shade ray r with material mod */
162          int  mod
163   )
164   {
165        int  gotmat;
165          register OBJREC  *m;
166 +
167          r->rt = r->rot;                 /* set effective ray length */
168 <        for (gotmat = 0; !gotmat && mod != OVOID; mod = m->omod) {
168 >        for ( ; mod != OVOID; mod = m->omod) {
169                  m = objptr(mod);
170                  /****** unnecessary test since modifier() is always called
171                  if (!ismodifier(m->otype)) {
# Line 184 | Line 184 | rayshade(              /* shade ray r with material mod */
184                          if (!islight(m->otype))
185                                  m = &Lamb;
186                  }
187 <                                        /* materials call raytexture */
188 <                gotmat = (*ofun[m->otype].funp)(m, r);
187 >                if ((*ofun[m->otype].funp)(m, r))
188 >                        return(1);      /* materials call raytexture() */
189          }
190 <        return(gotmat);
190 >        return(0);                      /* no material! */
191   }
192  
193  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines