188 |
|
} |
189 |
|
******/ |
190 |
|
if ((*ofun[m->otype].funp)(m, r)) |
191 |
< |
objerror(USER, r->ro, "conflicting materials"); |
191 |
> |
objerror(r->ro, USER, "conflicting materials"); |
192 |
|
} |
193 |
|
depth--; /* end here */ |
194 |
|
} |
228 |
|
backmat = foremat; |
229 |
|
/* check */ |
230 |
|
if (backmat != foremat) |
231 |
< |
objerror(USER, r->ro, "mixing material with non-material"); |
231 |
> |
objerror(r->ro, USER, "mixing material with non-material"); |
232 |
|
/* sum perturbations */ |
233 |
|
for (i = 0; i < 3; i++) |
234 |
|
r->pert[i] += coef*fr.pert[i] + (1.0-coef)*br.pert[i]; |
243 |
|
scalecolor(br.rcol, 1.0-coef); |
244 |
|
addcolor(r->rcol, fr.rcol); |
245 |
|
addcolor(r->rcol, br.rcol); |
246 |
+ |
if (foremat) |
247 |
+ |
r->rt = bright(fr.rcol) > bright(br.rcol) ? fr.rt : br.rt; |
248 |
|
/* return value tells if material */ |
249 |
|
return(foremat); |
250 |
|
} |