325 |
|
|
326 |
|
if (nd.rdiff > FTINY) { /* ambient from this side */ |
327 |
|
copycolor(ctmp, nd.mcolor); /* modified by material color */ |
328 |
< |
if (nd.specfl & SP_RBLT) |
329 |
< |
scalecolor(ctmp, 1.0-nd.trans); |
330 |
< |
else |
331 |
< |
scalecolor(ctmp, nd.rdiff); |
328 |
> |
scalecolor(ctmp, nd.rdiff); |
329 |
> |
if (nd.specfl & SP_RBLT) /* add in specular as well? */ |
330 |
> |
addcolor(ctmp, nd.scolor); |
331 |
|
multambient(ctmp, r, hastexture ? nd.pnorm : r->ron); |
332 |
|
addcolor(r->rcol, ctmp); /* add to returned color */ |
333 |
|
} |
404 |
|
nstarget = 1; |
405 |
|
} |
406 |
|
setcolor(scol, 0., 0., 0.); |
407 |
< |
dimlist[ndims++] = (int)np->mp; |
407 |
> |
dimlist[ndims++] = (int)(size_t)np->mp; |
408 |
|
maxiter = MAXITER*nstarget; |
409 |
|
for (nstaken = ntrials = 0; nstaken < nstarget && |
410 |
|
ntrials < maxiter; ntrials++) { |
468 |
|
} else |
469 |
|
nstarget = 1; |
470 |
|
} |
471 |
< |
dimlist[ndims++] = (int)np->mp; |
471 |
> |
dimlist[ndims++] = (int)(size_t)np->mp; |
472 |
|
maxiter = MAXITER*nstarget; |
473 |
|
for (nstaken = ntrials = 0; nstaken < nstarget && |
474 |
|
ntrials < maxiter; ntrials++) { |