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

Comparing ray/src/rt/aniso.c (file contents):
Revision 2.4 by greg, Tue Jan 14 16:16:48 1992 UTC vs.
Revision 2.5 by greg, Wed Jan 15 11:02:43 1992 UTC

# Line 206 | Line 206 | register RAY  *r;
206                          colval(nd.scolor,i) += (1.0-colval(nd.scolor,i))*dtmp;
207                  nd.rspec += (1.0-nd.rspec)*dtmp;
208                                                  /* check threshold */
209 <                if (nd.rspec <= specthresh+FTINY)
209 >                if (specthresh > FTINY &&
210 >                                ((specthresh >= 1.-FTINY ||
211 >                                specthresh + (.1 - .2*urand(8199+samplendx))
212 >                                        > nd.rspec)))
213                          nd.specfl |= SP_RBLT;
214  
215                  if (!(r->crtype & SHADOW) && nd.specfl & SP_PURE) {
# Line 229 | Line 232 | register RAY  *r;
232                  if (nd.tspec > FTINY) {
233                          nd.specfl |= SP_TRAN;
234                                                          /* check threshold */
235 <                        if (nd.tspec <= specthresh+FTINY)
235 >                        if (specthresh > FTINY &&
236 >                                        ((specthresh >= 1.-FTINY ||
237 >                                        specthresh +
238 >                                            (.1 - .2*urand(7241+samplendx))
239 >                                                > nd.tspec)))
240                                  nd.specfl |= SP_TBLT;
241                          if (r->crtype & SHADOW ||
242                                          DOT(r->pert,r->pert) <= FTINY*FTINY) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines