288 |
|
|
289 |
|
if (nd.tdiff > FTINY) { /* ambient from other side */ |
290 |
|
FVECT bnorm; |
291 |
– |
|
292 |
– |
flipsurface(r); |
291 |
|
bnorm[0] = -nd.pnorm[0]; |
292 |
|
bnorm[1] = -nd.pnorm[1]; |
293 |
|
bnorm[2] = -nd.pnorm[2]; |
299 |
|
} |
300 |
|
multambient(sctmp, r, bnorm); |
301 |
|
saddscolor(r->rcol, sctmp); |
304 |
– |
flipsurface(r); |
302 |
|
} |
303 |
|
/* add direct component */ |
304 |
|
direct(r, diraniso, &nd); |
350 |
|
int i; |
351 |
|
/* compute reflection */ |
352 |
|
if ((np->specfl & (SP_REFL|SP_RBLT)) == SP_REFL && |
353 |
< |
rayorigin(&sr, SPECULAR, np->rp, np->scolor) == 0) { |
353 |
> |
rayorigin(&sr, RSPECULAR, np->rp, np->scolor) == 0) { |
354 |
|
nstarget = 1; |
355 |
|
if (specjitter > 1.5) { /* multiple samples? */ |
356 |
|
nstarget = specjitter*np->rp->rweight + .5; |
421 |
|
copyscolor(sr.rcoef, np->mcolor); /* modify by material color */ |
422 |
|
scalescolor(sr.rcoef, np->tspec); |
423 |
|
if ((np->specfl & (SP_TRAN|SP_TBLT)) == SP_TRAN && |
424 |
< |
rayorigin(&sr, SPECULAR, np->rp, sr.rcoef) == 0) { |
424 |
> |
rayorigin(&sr, TSPECULAR, np->rp, sr.rcoef) == 0) { |
425 |
|
nstarget = 1; |
426 |
|
if (specjitter > 1.5) { /* multiple samples? */ |
427 |
|
nstarget = specjitter*np->rp->rweight + .5; |