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.12 by greg, Thu Jan 13 10:43:34 1994 UTC vs.
Revision 2.13 by greg, Mon Jan 24 11:51:31 1994 UTC

# Line 207 | Line 207 | double  coef;
207                  coef = 1.0;
208          else if (coef < 0.0)
209                  coef = 0.0;
210 +                                        /* compute foreground and background */
211 +        foremat = backmat = -1;
212                                          /* foreground */
213          copystruct(&fr, r);
214          if (fore != OVOID && coef > FTINY)
215                  foremat = rayshade(&fr, fore);
214        else
215                foremat = 0;
216                                          /* background */
217          copystruct(&br, r);
218          if (back != OVOID && coef < 1.0-FTINY)
219                  backmat = rayshade(&br, back);
220        else
221                backmat = foremat;
220                                          /* check */
221 +        if (foremat < 0)
222 +                if (backmat < 0)
223 +                        foremat = backmat = 0;
224 +                else
225 +                        foremat = backmat;
226 +        else if (backmat < 0)
227 +                backmat = foremat;
228          if ((foremat==0) != (backmat==0))
229                  objerror(r->ro, USER, "mixing material with non-material");
230                                          /* mix perturbations */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines