| 134 |
|
dtmp = np->alpha2; |
| 135 |
|
/* + source if flat */ |
| 136 |
|
if (np->specfl & SP_FLAT) |
| 137 |
< |
dtmp += omega * (0.25/PI); |
| 137 |
> |
dtmp += (1. - dstrsrc) * omega * (0.25/PI); |
| 138 |
|
/* half vector */ |
| 139 |
|
VSUB(vtmp, ldir, np->rp->rdir); |
| 140 |
|
d2 = DOT(vtmp, np->pnorm); |
| 225 |
|
VCOPY(nd.pnorm, r->ron); |
| 226 |
|
nd.pdot = r->rod; |
| 227 |
|
} |
| 228 |
< |
if (r->ro != NULL && isflat(r->ro->otype)) |
| 228 |
> |
if (!hastexture && r->ro != NULL && isflat(r->ro->otype)) |
| 229 |
|
nd.specfl |= SP_FLAT; |
| 230 |
|
if (nd.pdot < .001) |
| 231 |
|
nd.pdot = .001; /* non-zero for dirnorm() */ |
| 319 |
|
copyscolor(r->mcol, lr.rcol); |
| 320 |
|
saddscolor(r->rcol, lr.rcol); |
| 321 |
|
r->rmt = r->rot; |
| 322 |
< |
if (nd.specfl & SP_FLAT && |
| 323 |
< |
!hastexture | (r->crtype & AMBIENT)) |
| 322 |
> |
if (nd.specfl & SP_FLAT && r->crtype & AMBIENT) |
| 323 |
|
r->rmt += raydistance(&lr); |
| 324 |
|
} |
| 325 |
|
} |
| 394 |
|
nstarget = 1; |
| 395 |
|
} |
| 396 |
|
scolorblack(scol); |
| 397 |
< |
dimlist[ndims++] = (int)(size_t)np->mp; |
| 397 |
> |
dimlist[ndims_inc] = (int)(size_t)np->mp; |
| 398 |
|
maxiter = MAXITER*nstarget; |
| 399 |
|
for (nstaken = ntrials = 0; nstaken < nstarget && |
| 400 |
|
ntrials < maxiter; ntrials++) { |
| 458 |
|
} else |
| 459 |
|
nstarget = 1; |
| 460 |
|
} |
| 461 |
< |
dimlist[ndims++] = (int)(size_t)np->mp; |
| 461 |
> |
dimlist[ndims_inc] = (int)(size_t)np->mp; |
| 462 |
|
maxiter = MAXITER*nstarget; |
| 463 |
|
for (nstaken = ntrials = 0; nstaken < nstarget && |
| 464 |
|
ntrials < maxiter; ntrials++) { |