139 |
|
if (i < 0) |
140 |
|
continue; /* must not be important */ |
141 |
|
sr.rno = i; |
142 |
< |
d = getBSDF_incrad(il->sd, i); |
143 |
< |
d = 1.0/(PI*d*d); |
142 |
> |
d = 1.0/getBSDF_incohm(il->sd, i); |
143 |
|
} else { |
144 |
|
if (v[2] >= -FTINY) |
145 |
|
continue; /* only sample transmission */ |
150 |
|
j = d*nazi + 0.5; |
151 |
|
if (j >= nazi) j = 0; |
152 |
|
sr.rno = i*nazi + j; |
153 |
< |
d = nalt*nazi/PI; |
153 |
> |
d = nalt*nazi/PI * -v[2]; |
154 |
|
} |
155 |
|
d *= si.dom; /* solid angle correction */ |
156 |
|
scalecolor(sr.rcoef, d); |
392 |
|
nalt = sqrt(il->sd->nout/PI) + .5; |
393 |
|
nazi = PI*nalt + .5; |
394 |
|
redistribute(il->sd, nalt, nazi, u, v, fa->norm, xfm); |
395 |
+ |
il->sampdens = nalt*nazi/PI + .5; |
396 |
|
} |
397 |
|
/* write out the face and its distribution */ |
398 |
|
if (average(il, distarr, n)) { |
586 |
|
nalt = sqrt(il->sd->nout/PI) + .5; |
587 |
|
nazi = PI*nalt + .5; |
588 |
|
redistribute(il->sd, nalt, nazi, u, v, co->ad, xfm); |
589 |
+ |
il->sampdens = nalt*nazi/PI + .5; |
590 |
|
} |
591 |
|
/* write out the ring and its distribution */ |
592 |
|
if (average(il, distarr, n)) { |