118 |
|
|
119 |
|
int do_irrad = 0; /* compute irradiance? */ |
120 |
|
|
121 |
+ |
int rand_samp = 0; /* pure Monte Carlo sampling? */ |
122 |
+ |
|
123 |
|
double dstrsrc = 0.0; /* square source distribution */ |
124 |
|
double shadthresh = .03; /* shadow threshold */ |
125 |
|
double shadcert = .75; /* shadow certainty */ |
180 |
|
RAY *r |
181 |
|
) |
182 |
|
{ |
183 |
< |
rayorigin(r, NULL, PRIMARY, 1.0); |
184 |
< |
samplendx++; |
183 |
> |
rayorigin(r, PRIMARY, NULL, NULL); |
184 |
> |
samplendx = rand_samp ? random() : samplendx+1; |
185 |
|
rayvalue(r); /* assumes origin and direction are set */ |
186 |
|
} |
187 |
|
|