| 98 |
|
else if (sourcehit(r)) |
| 99 |
|
gotmat = rayshade(r, r->ro->omod); |
| 100 |
|
|
| 101 |
< |
if (!gotmat) |
| 101 |
> |
if (r->ro != NULL && !gotmat) |
| 102 |
|
objerror(r->ro, USER, "material not found"); |
| 103 |
|
|
| 104 |
|
if (trace != NULL) |
| 156 |
|
if (irr_ignore(m->otype)) { |
| 157 |
|
depth--; |
| 158 |
|
raytrans(r); |
| 159 |
< |
return; |
| 159 |
> |
return(1); |
| 160 |
|
} |
| 161 |
|
if (!islight(m->otype)) |
| 162 |
|
m = &Lamb; |
| 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 */ |