| 235 |
|
d = 1.0/(n*n); |
| 236 |
|
scalecolor(hp->acoef, d); |
| 237 |
|
/* make tangent plane axes */ |
| 238 |
< |
if (!getperpendicular(hp->ux, r->ron)) |
| 238 |
> |
if (!getperpendicular(hp->ux, r->ron, 1)) |
| 239 |
|
error(CONSISTENCY, "bad ray direction in samp_hemi"); |
| 240 |
|
VCROSS(hp->uy, r->ron, hp->ux); |
| 241 |
|
/* sample divisions */ |
| 733 |
|
ra[0] = maxarad; |
| 734 |
|
} |
| 735 |
|
/* flag encroached directions */ |
| 736 |
< |
if ((wt >= 0.89*AVGREFL) & (crlp != NULL)) |
| 736 |
> |
if (crlp != NULL) |
| 737 |
|
*crlp = ambcorral(hp, uv, ra[0]*ambacc, ra[1]*ambacc); |
| 738 |
|
if (pg != NULL) { /* cap gradient if necessary */ |
| 739 |
|
d = pg[0]*pg[0]*ra[0]*ra[0] + pg[1]*pg[1]*ra[1]*ra[1]; |