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.40 by schorsch, Thu Jun 26 00:58:10 2003 UTC vs.
Revision 2.41 by schorsch, Mon Jul 21 22:30:19 2003 UTC

# Line 278 | Line 278 | double  coef;
278                                          /* compute foreground and background */
279          foremat = backmat = 0;
280                                          /* foreground */
281 <        copystruct(&fr, r);
281 >        fr = *r;
282          if (coef > FTINY)
283                  foremat = rayshade(&fr, fore);
284                                          /* background */
285 <        copystruct(&br, r);
285 >        br = *r;
286          if (coef < 1.0-FTINY)
287                  backmat = rayshade(&br, back);
288                                          /* check for transparency */
289 <        if (backmat ^ foremat)
289 >        if (backmat ^ foremat) {
290                  if (backmat && coef > FTINY)
291                          raytrans(&fr);
292                  else if (foremat && coef < 1.0-FTINY)
293                          raytrans(&br);
294 +        }
295                                          /* mix perturbations */
296          for (i = 0; i < 3; i++)
297                  r->pert[i] = coef*fr.pert[i] + (1.0-coef)*br.pert[i];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines