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.5 by greg, Tue Jan 14 16:16:45 1992 UTC vs.
Revision 2.6 by greg, Wed Jan 15 11:02:40 1992 UTC

# Line 192 | Line 192 | register RAY  *r;
192                          colval(nd.scolor,i) += (1.0-colval(nd.scolor,i))*dtmp;
193                  nd.rspec += (1.0-nd.rspec)*dtmp;
194                                                  /* check threshold */
195 <                if (nd.rspec <= specthresh+FTINY)
195 >                if (specthresh > FTINY &&
196 >                                ((specthresh >= 1.-FTINY ||
197 >                                specthresh + (.1 - .2*urand(8199+samplendx))
198 >                                        > nd.rspec)))
199                          nd.specfl |= SP_RBLT;
200                                                  /* compute reflected ray */
201                  for (i = 0; i < 3; i++)
# Line 216 | Line 219 | register RAY  *r;
219                  if (nd.tspec > FTINY) {
220                          nd.specfl |= SP_TRAN;
221                                                          /* check threshold */
222 <                        if (nd.tspec <= specthresh+FTINY)
222 >                        if (specthresh > FTINY &&
223 >                                        ((specthresh >= 1.-FTINY ||
224 >                                        specthresh +
225 >                                            (.1 - .2*urand(7241+samplendx))
226 >                                                > nd.tspec)))
227                                  nd.specfl |= SP_TBLT;
228                          if (r->crtype & SHADOW ||
229                                          DOT(r->pert,r->pert) <= FTINY*FTINY) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines