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.83 by greg, Sun Jan 31 18:08:04 2021 UTC vs.
Revision 2.84 by greg, Sun Jan 31 20:55:04 2021 UTC

# Line 527 | Line 527 | rayreject(             /* check if candidate hit is worse than cu
527          OBJREC  *mnew, *mray;
528  
529          if ((t <= FTINY) | (t > r->rot + FTINY))
530 <                return 1;
530 >                return(1);
531          if (t < r->rot - FTINY)         /* is new hit significantly closer? */
532 <                return 0;
533 <                                        /* coincident, so decide... */
532 >                return(0);
533 >                                        /* coincident point, so decide... */
534          if (o == r->ro)
535 <                return 1;               /* shouldn't happen */
535 >                return(1);              /* shouldn't happen */
536          if (r->ro == NULL)
537 <                return 0;               /* ditto */
537 >                return(0);              /* ditto */
538          if ((mnew = findmaterial(o)) == NULL)
539 <                return 1;               /* new has no material */
539 >                return(1);              /* new has no material */
540          if ((mray = findmaterial(r->ro)) == NULL)
541 <                return 0;               /* old has no material(!) */
541 >                return(0);              /* old has no material(!) */
542          if (istransp(mnew->otype))
543 <                return 1;               /* new is transparent */
544 <
545 <        return !istransp(mray->otype);  /* reject unless old is */
543 >                return(1);              /* new is transparent */
544 >        if (istransp(mray->otype))
545 >                return(0);              /* old is transparent */
546 >                        /* weakest priority to later modifier definition */
547 >        return (r->ro->omod >= o->omod);
548   }
549  
550   void

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines