305 |
|
for (j = 0; j < 4; j++) |
306 |
|
p.flux [j] = getint(1, pmapFile); |
307 |
|
#endif |
308 |
+ |
|
309 |
+ |
|
310 |
|
|
311 |
|
/* Skip primary ray index */ |
312 |
|
getint(sizeof(p.primary), pmapFile); |
317 |
|
|
318 |
|
/* Dump photon probabilistically acc. to target sphere count */ |
319 |
|
if (frandom() <= dumpRatio) { |
320 |
< |
if (fluxCol) |
320 |
> |
if (fluxCol) { |
321 |
|
/* Get photon flux */ |
322 |
|
getPhotonFlux(&p, col); |
323 |
+ |
/* Scale by dumpRatio for energy conservation */ |
324 |
+ |
scalecolor(col, 1.0 / dumpRatio); |
325 |
+ |
} |
326 |
|
|
327 |
|
if (!points) { |
328 |
|
if (fluxCol) { |