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

Comparing ray/src/rt/srcsamp.c (file contents):
Revision 2.22 by greg, Fri Nov 15 20:47:42 2024 UTC vs.
Revision 2.24 by greg, Wed Dec 25 17:40:27 2024 UTC

# Line 50 | Line 50 | sskip_rsi(uby8 *flags)
50                          return(-2-i);   /* found it! */
51                                          /* else tack on new entry */
52          if (ssf_count >= ssf_max) {     /* need more space? */
53 fprintf(stderr, "DEBUG: skip flag array > %d entries (%.2f MBytes)\n",
54 ssf_count, SSKIPFLSIZ/1024./1024.*ssf_count);
53                  ssf_max = ssf_count + (ssf_count>>2) + 64;
54                  if (ssf_max <= ssf_count &&
55                                  (ssf_max = ssf_count+1024) <= ssf_count)
# Line 99 | Line 97 | srcskip(                       /* pre-emptive test for source to skip */
97  
98          if (sp->sflags & SSKIP)
99                  return(1);
100 < #ifdef SSKIPOPT
101 <        if (r->rsrc < -1 &&     /* ray has custom skip flags? */
102 <                        sskip_chk(sskip_flags(r->rsrc), sn))
100 > #ifdef SSKIPOPT                 /* parent ray has custom skip flags? */
101 >        if (r->parent != NULL && r->parent->rsrc < -1 &&
102 >                        sskip_chk(sskip_flags(r->parent->rsrc), sn))
103                  return(1);
104   #endif
105 <        if ((sp->sflags & (SPROX|SDISTANT)) != SPROX)
106 <                return(0);
109 <
110 <        return(dist2(r->rorg, sp->sloc) >
105 >        if ((sp->sflags & (SPROX|SDISTANT)) == SPROX)
106 >                return(dist2(r->rorg, sp->sloc) >
107                          (sp->sl.prox + sp->srad)*(sp->sl.prox + sp->srad));
108 +        return(0);
109   }
110  
111   double

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines