177 |
|
pp[0] = pictview.vp[0] + vd[0]; |
178 |
|
pp[1] = pictview.vp[1] + vd[1]; |
179 |
|
pp[2] = pictview.vp[2] + vd[2]; |
180 |
< |
viewloc(ip, &pictview, pp); |
181 |
< |
if (ip[2] <= FTINY || ip[0] < 0. || ip[0] >= 1. || |
182 |
< |
ip[1] < 0. || ip[1] >= 1.) |
180 |
> |
if (viewloc(ip, &pictview, pp) != 1) |
181 |
|
return(-1.0); |
182 |
|
colr_color(res, getpictscan((int)(ip[1]*pysiz))[(int)(ip[0]*pxsiz)]); |
183 |
|
return(luminance(res)/exposure); |
247 |
|
/* send to rtrace */ |
248 |
|
if (n >= maxpix) { /* flush */ |
249 |
|
rt_compute(rt_buf, n); |
250 |
< |
while (n-- > 0) |
250 |
> |
while (n > 0) { |
251 |
> |
--n; |
252 |
|
vb[buf_vh[n]+hsize] = luminance(rt_buf+3*n); |
253 |
+ |
} |
254 |
|
} |
255 |
|
rt_buf[6*n] = ourview.vp[0]; |
256 |
|
rt_buf[6*n+1] = ourview.vp[1]; |