1 |
+ |
#ifndef lint |
2 |
+ |
static const char RCSid[] = "$Id$"; |
3 |
+ |
#endif |
4 |
|
/* |
5 |
|
================================================================== |
6 |
|
Photon map support routines for emission from light sources |
10 |
|
(c) Lucerne University of Applied Sciences and Arts, |
11 |
|
supported by the Swiss National Science Foundation (SNSF, #147053) |
12 |
|
================================================================== |
13 |
< |
|
11 |
< |
$Id$ |
13 |
> |
|
14 |
|
*/ |
15 |
|
|
16 |
|
|
673 |
|
|
674 |
|
VCOPY(r.rorg, emap -> photonOrg); |
675 |
|
VCOPY(r.rop, emap -> photonOrg); |
676 |
< |
r.rmax = FHUGE; |
676 |
> |
r.rmax = 0; |
677 |
|
|
678 |
|
for (t = 0; t < emap -> numTheta; t++) { |
679 |
|
for (p = 0; p < emap -> numPhi; p++) { |
748 |
|
/* Choose a new origin within current partition for every |
749 |
|
emitted photon to break up clustering artifacts */ |
750 |
|
photonOrigin [emap -> src -> so -> otype] ((EmissionMap*)emap); |
751 |
+ |
/* If we have a local glow source with a maximum radius, then |
752 |
+ |
restrict our photon to the specified distance (otherwise no limit) */ |
753 |
+ |
if (mod -> otype == MAT_GLOW && !(emap -> src -> sflags & SDISTANT) |
754 |
+ |
&& mod -> oargs.farg[3] > FTINY) |
755 |
+ |
ray -> rmax = mod -> oargs.farg[3]; |
756 |
+ |
else |
757 |
+ |
ray -> rmax = 0; |
758 |
|
rayorigin(ray, PRIMARY, NULL, NULL); |
750 |
– |
ray -> rmax = FHUGE; |
759 |
|
|
760 |
|
if (!emap -> numSamples) { |
761 |
|
/* Source is unmodified and has no port, and either local with |